keybase / go-crypto

[mirror] Go supplementary cryptography libraries
https://godoc.org/golang.org/x/crypto
BSD 3-Clause "New" or "Revised" License
50 stars 20 forks source link

Trim whitespace during armor decoding #54

Closed zapu closed 7 years ago

zapu commented 7 years ago

Trim characters that match unicode.IsSpace and \u200b (zero-width space) from headers and base64 body. Unfortunately there is no way to ask base64 decoder to skip invalid characters, but we can at least try to trim unwanted characters at the beginning or end of lines.

Should fix https://github.com/keybase/client/issues/6996