Commit ab15167e authored by ale's avatar ale

Ignore padding when decoding base64 data in wire protocol

The auth_client C library writes padded url-base64-encoded data.
parent 5f6c4202
Pipeline #3021 passed with stages
in 2 minutes and 2 seconds
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment