]> Cypherpunks repositories - gostls13.git/commit
mime: limit UTF-8 encoded-word length to 75 characters
authorAlexandre Cesaro <alexandre.cesaro@gmail.com>
Thu, 24 Sep 2015 21:45:13 +0000 (23:45 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 15 Oct 2015 00:08:03 +0000 (00:08 +0000)
commit65fc379daeda784d085f98d621a9ab712c096148
treec90eb3c81088661ac19d60af4b64e5e3471c2475
parent9f60a0a2b01c9d1079ea8991125b471cdaa7eb56
mime: limit UTF-8 encoded-word length to 75 characters

As specified by RFC 2047 section 2, encoded-words may not be more than
75 characters long.

We only enforce this rule when the charset is UTF-8, since multi-bytes
characters must not be split accross encoded-words (see section 5.3).

Fixes #12300

Change-Id: I72a43fc3fe6ddeb3dab54dcdce0837d7ebf658f0
Reviewed-on: https://go-review.googlesource.com/14957
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/mime/encodedword.go
src/mime/encodedword_test.go