Skip to content
Snippets Groups Projects
Commit ab15167e authored by ale's avatar ale
Browse files

Ignore padding when decoding base64 data in wire protocol

The auth_client C library writes padded url-base64-encoded data.
parent 5f6c4202
No related branches found
No related tags found
No related merge requests found
......@@ -148,7 +148,7 @@ func (i *inputScanner) parseQuotedString() (string, error) {
}
func (i *inputScanner) parseBase64String() (string, error) {
data := i.parseUntilOrEOF(' ')
data := bytes.TrimRight(i.parseUntilOrEOF(' '), "=")
out := make([]byte, base64.RawURLEncoding.DecodedLen(len(data)))
_, err := base64.RawURLEncoding.Decode(out, data)
if err != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment