]> Cypherpunks.ru repositories - gostls13.git/commit
mime: derestrict value backslash unescaping for all encodings
authorEugene Kalinin <e.v.kalinin@gmail.com>
Tue, 19 Jun 2018 18:19:47 +0000 (21:19 +0300)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 24 Sep 2018 16:13:59 +0000 (16:13 +0000)
commit3ff28f7d7117713b684014cbf79e858180a45f5d
treef141f67f3fa5bc4e2d1b616d1696aeb819a7e8a1
parentce536837d8e53f1bf0c7ef450d4580d19f7d6f52
mime: derestrict value backslash unescaping for all encodings

Previously consumeValue performed consumption of "unnecessary backslashes"
strictly for non-ASCII and non-token runes. Thus if it encountered a
backslash before a rune that is out of the ASCII range, it would
erroneously skip that backslash. This change now derestricts
"unnecessary backslash" unescaping for all character encodings,
using "isTSpecial" instead of "!isTokenChar".
This change is a follow-up of CL 32175.

Fixes #25888

Change-Id: I5e02bbf9c42f753a6eb31399b8d20315af991490
Reviewed-on: https://go-review.googlesource.com/119795
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/mime/mediatype.go
src/mime/mediatype_test.go