-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
encoding/base64: make decoding more lenient (?) #28205
Comments
@koggle Remove the trailing space in the |
The template is still not complete. Please re-read what @ianlancetaylor and myself requested in #28185. In particular, fill in |
This has nothing to do with go version and go env, thanks |
Please refer to the code, thanks. func (enc *Encoding) decodeQuantum(dst, src []byte, si int) (nsi, n int, err error) {
} The above code is well written, but I simplified it and it is clearer. func (enc *Encoding) decodeQuantum(dst, src []byte, si int) (nsi, n int, err error) {
} // DecodedLen returns the maximum length in bytes of the decoded data |
Yes, the Go version and environment is relevant even when you think it isn't. It's just a matter of being clear so that maintainers and contributors don't have to spend extra time asking for extra information, just like I am doing right now. Please don't dump large amounts of code - that is not helping clarify what the issue is or why you think it's a bug. |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?win
What did you do?
package main
import (
"fmt"
"encoding/base64"
)
func main() {
fmt.Println(base64.RawStdEncoding.DecodeString("abc ")) //decoding error
}
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
//print [105,183] nil
What did you see instead?
//print [] illegal base64 data at input byte 3
The text was updated successfully, but these errors were encountered: