This is an automated email from the ASF dual-hosted git repository.
chibenwa pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/james-mime4j.git
from 75b5b06b Bump com.google.guava:guava in /james-utils (#136)
new 6b324b3f [FIX] BasicBodyFactory: copies must not share a recycled
buffer
new f1aef13a [FIX] MimeBoundaryInputStream: MIME structure must not depend
on read sizes
new c8ba8613 [FIX] Lower case MIME types and parameter names with Locale.US
new 4ddb80cc [FIX] DelegatingFieldParser: register and look up parsers
with Locale.US
new 53127344 [FIX] DateTimeParser: reject years of more than 9 digits
new d62f5a5e [FIX] DateTimeParser: report oversized numbers as
ParseException
new a31d22ed [FIX] DecoderUtil: report strict B decoding errors as
IllegalArgumentException
new 32f23d9a [FIX] DecoderUtil: report strict Q decoding errors as
IllegalArgumentException
new ad60a436 [FIX] LenientAddressParser: a domainless angle address ends
at '>'
new e0b5b5e8 [FIX] DateTimeFieldLenientImpl: honour RFC 5322 obsolete zones
new fadac3a4 [FIX] MessageMatcher: find texts ending the input and
self-overlapping texts
new ae7538a6 [FIX] MimeParameterMapping: decode each parameter with its
own charset
new 31bc682e [FIX] MimeParameterMapping: join RFC 2231 continuations by
section number
new e6791ef6 [FIX] MimeVersionFieldImpl: report lexical errors as
ParseException
new 5ec4d828 [FIX] QuotedPrintableInputStream: closing twice must release
buffers once
new 6cb17d8f [FIX] RawFieldParser: never decode the boundary parameter as
an encoded word
new c6cd5bc1 [FIX] malformedHeaderStartsBody: unread into the line reader
buffer
new 4aece1cd [FIX] Test stop() after a malformed header starting the body
new 8e486103 [FIX] MessageMatcher: search all texts in a single pass
new 4fdd294d [FIX] ContentDispositionFieldLenientImpl: case insensitive
getParameter
new 916ae008 [FIX] EncoderUtil: reject display names holding CR or LF
new 67b0696a [FIX] EncoderUtil: encode text holding an encoded word
lookalike
new 5d3b58ad [FIX] Strict Content-Type/Content-Disposition parsers: read
non-ASCII values
new 350d09e2 [FIX] AbstractHeader: match fields with the index key in
removeFields/setField
new ff036e46 [FIX] AbstractHeader#setField: never insert at index -1
new 3f7e4405 [FIX] AddressFormatter: write an empty address as <>
new a8c2bfa4 [FIX] LenientAddressParser: RFC 2047 decode group names
new e831f2e5 [FIX] LenientAddressParser: drop the whitespace around the
dots of a local part
new 5fab5dc2 [FIX] DateTimeFieldLenientImpl: map 1 and 3 digit years as
the strict parser
new 88a38827 [FIX] MboxIterator: a From_ line can end the buffer without
line terminator
new 5bef6df7 [FIX] MboxIterator: skip the CRLF ending a From_ line
new dd847421 [FIX] MboxIterator: no IllegalStateException when a refilled
buffer holds no From_ line
new 8ebc2af7 [FIX] MimeUtil#fold: never write a whitespace only line
new 7858e7fa [FIX] MimeUtil#formatDate: denote the instant when the zone
offset has seconds
new 843b47c3 [FIX] MimeBoundaryInputStream: match a non-ASCII boundary
with its UTF-8 bytes
new e207bf2a [FIX] MultipartImpl: decode the preamble and epilogue as UTF-8
new 9abba176 [FIX] RawFieldParser: a backslash before a fold applies to
the following WSP
new f5d199f6 [FIX] QuotedPrintableInputStream: decoding must not depend on
read sizes
new c1186532 [FIX] Strict Content-Type/Content-Disposition parsers: accept
all-digit tokens
new 1799ee9d [FIX] DateTime#convertToDate: use the proleptic Gregorian
calendar
new 125951c9 [FIX] Line length limit: do not count the line terminator
new 892bb3e9 [FIX] MimeParameterMapping: valueless parameters must not
throw
new a8ed914c [FIX] RawFieldParser: a backslash only skips a line break
that is a fold
new 30840375 [FIX] MboxIterator: examine a From_ line cut by the first
buffer again
new efe93424 [FIX] MimeUtil#fold: never break right after a fold already
in the value
new 894bb854 [FIX] Base64InputStream: never return 0 when a pad ends the
read
new 39c9f929 [FIX] MimeBoundaryInputStream: skip the last lone LF of a
delimiter line
new 44f56c6a [FIX] LenientAddressParser: a '(' inside a domain literal is
not a comment
new cb485031 [FIX] MimeUtil#formatDate: write the year in full
new 60c561b1 [FIX] MimeTokenStream#parseHeadless: report a failure of its
first step from next()
new d5e0f2e1 [FIX] RawField#getBody: skip a single whitespace after the
colon
new 2496eb99 [FIX] LenientAddressParser: decode a domain literal as UTF-8
new 6696f6e4 [FIX] MimeStreamParser: report the end of a headless header
once
new 74fedaac [FIX] DefaultFieldBuilder: header length limit must not count
CRLF as 2 bytes
new 41f5466a [FIX] Lenient Content-Type parsing: only trim whitespace
new 819128ec [FIX] EncoderUtil: encode display names holding CR or LF
instead of rejecting them
new 745a9794 [FIX] EncoderUtil: drop CR and LF from a quoted local part
new 23794d50 [FIX] DefaultAddressParser: RFC 2047 decode group names
new f98fb2ff [FIX] AddressFormatter: reject a domain that is not a
dot-atom or a domain literal
new 436b4ed4 [FIX] EncoderUtil: quote display names whose whitespace would
not read back
new 9004b30c [FIX] EncoderUtil#encodeAddressDomain: neutralize instead of
rejecting
new 76e52204 [FIX] RawFieldParser#parseField: read the field name verbatim
new c67be25c [FIX] DefaultBodyDescriptorBuilder#newChild: hand children
the resolved type
new fc969233 [FIX] RawField#checkLineBreaks: reject a whitespace only
continuation line
new 040b7667 [FIX] MimeUtil#fold: never break right before a fold already
in the value
new 01cf2851 [FIX] AbstractEntity#getMimeType: ignore a parent multipart
type without boundary
new dde230bd [FIX] RawField(name, body): reject names that are not RFC
5322 field names
new 5e7760c9 [FIX] AddressFormatter: no "@" when the domain is neutralized
to nothing
new 73fd0cdd [FIX] DefaultMessageWriter: never encode a multipart body
new 2e060b7d [FIX] EncoderUtil#encodeHeaderParameter: reject invalid
parameter names
new 54f09967 [REFACTORING] EncoderUtil: check RFC 2231 parameter names
without a regex
new 624de5d9 [PERF] MimeBoundaryInputStream: look for the delimiter at
line starts only
new bfda181d [FIX] DOM builders: encode text in UTF-8 when the charset
only decodes
new 8e19b6c0 [FIX] maxLineLen: accept a line of exactly maxLineLen bytes
new 78ad364c [FIX] StorageBodyFactory#textBody: fall back to US-ASCII for
a charset that cannot encode
new 8b466226 [FIX] EncoderUtil#encodeEncodedWord: choose the charset when
the given one cannot encode
new 724ec010 [FIX] Mailbox#hashCode: fold the domain the way equals
compares it
new 20133b9c [FIX] maxContentLen: 0 disables the check, a body of exactly
the limit is accepted
new 6db025c1 [FIX] maxContentLen: apply the limit to the whole content,
whatever the number of streams
new a5a7ee4a [FIX] maxContentLen: report an exceeded limit as a
MimeException
new ee64b736 [FIX] maxHeaderLen: accept a header field of exactly
maxHeaderLen bytes
new d38c667b [FIX] MimeTokenStream: a zero-length read does not consume
the multipart body raw
new 5923886c [TEST] maxHeaderCount: a header of exactly maxHeaderCount
fields is accepted
new a586654f [PERF] DateTimeFieldLenientImpl: parse the common date form
with a simple formatter
new 6097c81b fixup! [PERF] DateTimeFieldLenientImpl: parse the common date
form with a simple formatter
new b5eb7aa8 [PATCH 2/3] fixup! [FIX] DateTimeParser: reject years of more
than 9 digits
new dc1e6419 [PATCH 3/3] fixup! [FIX] MimeUtil#fold: never write a
whitespace only line
The 87 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../james/mime4j/codec/Base64InputStream.java | 3 +-
.../org/apache/james/mime4j/codec/DecoderUtil.java | 8 +-
.../org/apache/james/mime4j/codec/EncoderUtil.java | 120 +++++++-
.../mime4j/codec/QuotedPrintableInputStream.java | 10 +-
.../mime4j/io/BufferedLineReaderInputStream.java | 77 ++---
.../apache/james/mime4j/io/LimitedInputStream.java | 36 ++-
.../james/mime4j/io/LineReaderInputStream.java | 21 ++
.../mime4j/io/LineReaderInputStreamAdaptor.java | 9 +-
...on.java => MaxContentLengthLimitException.java} | 10 +-
.../james/mime4j/io/MimeBoundaryInputStream.java | 172 ++++++++---
.../james/mime4j/parser/MimeStreamParser.java | 5 +
.../james/mime4j/stream/DefaultFieldBuilder.java | 12 +-
.../stream/FallbackBodyDescriptorBuilder.java | 8 +-
.../org/apache/james/mime4j/stream/MimeConfig.java | 14 +-
.../org/apache/james/mime4j/stream/MimeEntity.java | 36 ++-
.../james/mime4j/stream/MimeTokenStream.java | 39 ++-
.../org/apache/james/mime4j/stream/RawField.java | 28 +-
.../apache/james/mime4j/stream/RawFieldParser.java | 64 +++-
.../mime4j/util/ByteArrayOutputStreamRecycler.java | 22 +-
.../org/apache/james/mime4j/util/CharsetUtil.java | 41 ++-
.../org/apache/james/mime4j/util/LangUtils.java | 20 ++
.../james/mime4j/util/MimeParameterMapping.java | 113 +++++--
.../org/apache/james/mime4j/util/MimeUtil.java | 133 +++++++--
.../james/mime4j/util/RecycledByteArrayBuffer.java | 7 +-
.../james/mime4j/codec/Base64InputStreamTest.java | 15 +
.../apache/james/mime4j/codec/DecoderUtilTest.java | 20 ++
.../apache/james/mime4j/codec/EncoderUtilTest.java | 94 +++++-
.../codec/QuotedPrintableInputStreamTest.java | 50 ++++
.../io/BufferedLineReaderInputStreamTest.java | 21 +-
.../james/mime4j/io/LimitedInputStreamTest.java | 30 ++
.../io/LineReaderInputStreamAdaptorTest.java | 4 +-
.../mime4j/io/MimeBoundaryInputStreamTest.java | 117 ++++++++
.../mime4j/stream/BoundaryAtBufferEndTest.java | 126 ++++++++
.../mime4j/stream/DefaultFieldBuilderTest.java | 19 ++
.../stream/FallbackBodyDescriptorBuilderTest.java | 15 +
.../stream/MalformedHeaderStartsBodyTest.java | 84 ++++++
.../james/mime4j/stream/MimeEntityLimitsTest.java | 17 ++
.../mime4j/stream/MimeTokenStreamLimitsTest.java | 323 +++++++++++++++++++++
.../james/mime4j/stream/MimeTokenStreamTest.java | 59 ++++
.../james/mime4j/stream/RawFieldParserTest.java | 39 +++
.../apache/james/mime4j/stream/RawFieldTest.java | 32 ++
.../mime4j/util/MimeParameterMappingTest.java | 99 +++++++
.../org/apache/james/mime4j/util/MimeUtilTest.java | 130 ++++++++-
.../attachment-filename-encoding-Latin1.out | 1 -
.../attachment-filename-encoding-Latin1.xml | 3 -
...attachment-filename-encoding-Latin1_decoded.xml | 3 -
.../attachment-filename-encoding-UTF8.out | 1 -
.../attachment-filename-encoding-UTF8.xml | 3 -
.../attachment-filename-encoding-UTF8_decoded.xml | 3 -
.../mimetools-testmsgs/empty-preamble.out | 1 -
.../mimetools-testmsgs/empty-preamble.xml | 3 -
.../mimetools-testmsgs/empty-preamble_decoded.xml | 3 -
.../resources/mimetools-testmsgs/ticket-60931.out | 1 -
.../resources/mimetools-testmsgs/ticket-60931.xml | 3 -
.../mimetools-testmsgs/ticket-60931_decoded.xml | 3 -
.../test/resources/mimetools-testmsgs/twopart.out | 1 -
.../test/resources/mimetools-testmsgs/twopart.xml | 3 -
.../mimetools-testmsgs/twopart_decoded.xml | 3 -
.../malformedHeaderStartsBody-nocrlfcrlf.out | 1 +
.../malformedHeaderStartsBody-nocrlfcrlf.xml | 1 +
...formedHeaderStartsBody-nocrlfcrlf_decoded_1.txt | 1 +
.../malformedHeaderStartsBody-noheader.out | 1 +
.../malformedHeaderStartsBody-noheader.xml | 1 +
...alformedHeaderStartsBody-noheader_decoded_1.txt | 1 +
.../java/org/apache/james/mime4j/dom/Message.java | 3 +
.../apache/james/mime4j/dom/address/Mailbox.java | 5 +-
.../apache/james/mime4j/dom/datetime/DateTime.java | 4 +-
.../mime4j/field/ContentDispositionFieldImpl.java | 2 +-
.../field/ContentDispositionFieldLenientImpl.java | 2 +-
.../james/mime4j/field/ContentTypeFieldImpl.java | 7 +-
.../mime4j/field/ContentTypeFieldLenientImpl.java | 10 +-
.../mime4j/field/DateTimeFieldLenientImpl.java | 217 +++++++++++++-
.../james/mime4j/field/DelegatingFieldParser.java | 5 +-
.../james/mime4j/field/MimeVersionFieldImpl.java | 3 +
.../mime4j/field/address/AddressFormatter.java | 23 +-
.../apache/james/mime4j/field/address/Builder.java | 11 +-
.../mime4j/field/address/LenientAddressParser.java | 123 ++++++--
.../james/mime4j/message/AbstractEntity.java | 4 +
.../james/mime4j/message/AbstractHeader.java | 12 +-
.../james/mime4j/message/BasicBodyFactory.java | 20 +-
.../james/mime4j/message/BodyPartBuilder.java | 3 +
.../message/DefaultBodyDescriptorBuilder.java | 13 +-
.../james/mime4j/message/DefaultMessageWriter.java | 6 +-
.../james/mime4j/message/MultipartBuilder.java | 4 +-
.../apache/james/mime4j/message/MultipartImpl.java | 6 +-
.../james/mime4j/message/SingleBodyBuilder.java | 5 +
.../contentdisposition/ContentDispositionParser.jj | 15 +-
.../mime4j/field/contenttype/ContentTypeParser.jj | 15 +-
.../james/mime4j/field/datetime/DateTimeParser.jj | 18 +-
.../mime4j/field/ContentDispositionFieldTest.java | 8 +
.../james/mime4j/field/DateTimeFieldImplTest.java | 51 ++++
.../field/DateTimeFieldLenientFastPathTest.java | 125 ++++++++
.../org/apache/james/mime4j/field/FieldsTest.java | 72 +++++
.../field/LenientContentDispositionFieldTest.java | 24 ++
.../mime4j/field/LenientContentTypeFieldTest.java | 16 +
.../mime4j/field/LenientDateTimeFieldTest.java | 31 ++
.../james/mime4j/field/MimeVersionParserTest.java | 8 +
.../james/mime4j/field/TurkishLocaleTest.java | 110 +++++++
.../james/mime4j/field/address/AddressTest.java | 36 +++
.../field/address/DefaultAddressBuilderTest.java | 8 +
.../field/address/LenientAddressBuilderTest.java | 118 ++++++++
.../mime4j/message/BasicBodyFactoryCopyTest.java | 90 ++++++
.../DefaultMessageBuilderParseHeaderTest.java} | 35 ++-
.../mime4j/message/DefaultMessageWriterTest.java | 204 ++++++++++++-
.../james/mime4j/message/HeaderImplTest.java | 43 +++
.../james/mime4j/message/MultipartBuilderTest.java | 37 +++
.../james/mime4j/utils/search/MessageMatcher.java | 127 ++++++--
.../mime4j/utils/search/MessageMatcherTest.java | 69 +++++
.../james/mime4j/mboxiterator/MboxIterator.java | 83 +++++-
.../mboxiterator/MboxIteratorEdgeCasesTest.java | 115 ++++++++
.../james/mime4j/storage/StorageBodyFactory.java | 9 +
.../mime4j/storage/StorageBodyFactoryTest.java | 79 +++++
112 files changed, 3991 insertions(+), 386 deletions(-)
copy
core/src/main/java/org/apache/james/mime4j/io/{MaxHeaderLengthLimitException.java
=> MaxContentLengthLimitException.java} (76%)
create mode 100644
core/src/test/java/org/apache/james/mime4j/stream/BoundaryAtBufferEndTest.java
create mode 100644
core/src/test/java/org/apache/james/mime4j/stream/MalformedHeaderStartsBodyTest.java
create mode 100644
core/src/test/java/org/apache/james/mime4j/stream/MimeTokenStreamLimitsTest.java
create mode 100644
dom/src/test/java/org/apache/james/mime4j/field/DateTimeFieldLenientFastPathTest.java
create mode 100644
dom/src/test/java/org/apache/james/mime4j/field/TurkishLocaleTest.java
create mode 100644
dom/src/test/java/org/apache/james/mime4j/message/BasicBodyFactoryCopyTest.java
copy dom/src/{main/java/org/apache/james/mime4j/message/HeaderImpl.java =>
test/java/org/apache/james/mime4j/message/DefaultMessageBuilderParseHeaderTest.java}
(55%)
create mode 100644
mbox/src/test/java/org/apache/james/mime4j/mboxiterator/MboxIteratorEdgeCasesTest.java
create mode 100644
storage/src/test/java/org/apache/james/mime4j/storage/StorageBodyFactoryTest.java
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]