Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mime/multipart: quoted-printable check is case sensitive #28674

Closed
laochailan opened this issue Nov 8, 2018 · 1 comment
Closed

mime/multipart: quoted-printable check is case sensitive #28674

laochailan opened this issue Nov 8, 2018 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.

Comments

@laochailan
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.11.2 linux/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/user/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/user/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build092395101=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I use Part.Read() to read from a multipart body containing parts that have
Content-Transfer-Encoding: Quoted-printable with non-lowercase quoted-printable.

https://play.golang.org/p/G_4Dq4YEo4_4

What did you expect to see?

The correctly decoded letter ü. RFC 2045 6.1 states that this header field is case insensitive and as always with e-mail, apart from the RFC only creativity is the limit. I got QUOTED-PRINTABLE and Quoted-Printable so far…

What did you see instead?

The raw =C3=BC.

In src/mime/multipart/multipart.go:138 the check appears to assume lower case transfer encoding.

@gopherbot
Copy link

Change https://golang.org/cl/148579 mentions this issue: mime/multipart: check for quoted-printable case insensitively

@bradfitz bradfitz self-assigned this Nov 8, 2018
@bradfitz bradfitz added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 8, 2018
@golang golang locked and limited conversation to collaborators Nov 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants