{"action":"opened","issue":{"url":"https://api.github.com/repos/golang/go/issues/25332","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/25332/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/25332/comments","events_url":"https://api.github.com/repos/golang/go/issues/25332/events","html_url":"https://github.com/golang/go/issues/25332","id":322001923,"number":25332,"title":"encoding/base32: buffered decoder expects padding even when NoPadding is set","user":{"login":"AxbB36","id":18689121,"avatar_url":"https://avatars1.githubusercontent.com/u/18689121?v=4","gravatar_id":"","url":"https://api.github.com/users/AxbB36","html_url":"https://github.com/AxbB36","followers_url":"https://api.github.com/users/AxbB36/followers","following_url":"https://api.github.com/users/AxbB36/following{/other_user}","gists_url":"https://api.github.com/users/AxbB36/gists{/gist_id}","starred_url":"https://api.github.com/users/AxbB36/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AxbB36/subscriptions","organizations_url":"https://api.github.com/users/AxbB36/orgs","repos_url":"https://api.github.com/users/AxbB36/repos","events_url":"https://api.github.com/users/AxbB36/events{/privacy}","received_events_url":"https://api.github.com/users/AxbB36/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-10T16:48:52Z","updated_at":"2018-05-10T16:48:52Z","closed_at":null,"author_association":"NONE","body":"A decoder created with `NewDecoder` and `NoPadding` expects to find padding at the end of the input, which differs from the behavior of `Decode` and `DecodeString`.\r\n\r\nThis bug is separate from #25296, which fixed the error result for the non-`NoPadding` case.\r\n\r\n### What version of Go are you using (`go version`)?\r\n\r\n`go version devel +ef24fd739b Thu May 10 15:40:01 2018 +0000 linux/amd64`\r\n\r\n### Does this issue reproduce with the latest release?\r\n\r\nYes.\r\n\r\n### What operating system and processor architecture are you using (`go env`)?\r\n\r\n```\r\nGOARCH=\"amd64\"\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"linux\"\r\nGOOS=\"linux\"\r\n```\r\n\r\n### What did you do?\r\n\r\nhttps://play.golang.org/p/k9HrTwJM29c\r\n```\r\npackage main\r\n\r\nimport (\r\n\t\"encoding/base32\"\r\n\t\"fmt\"\r\n\t\"io/ioutil\"\r\n\t\"strings\"\r\n)\r\n\r\nfunc main() {\r\n\twithoutPadding := base32.StdEncoding.WithPadding(base32.NoPadding)\r\n\tinput := withoutPadding.EncodeToString([]byte(\"foobar\"))\r\n\tfmt.Printf(\"input %q\\n\", input)\r\n\tr, err := withoutPadding.DecodeString(input)\r\n\tfmt.Printf(\"DecodeString: %q %v\\n\", r, err)\r\n\tr, err = ioutil.ReadAll(base32.NewDecoder(withoutPadding, strings.NewReader(input)))\r\n\tfmt.Printf(\"NewDecoder  : %q %v\\n\", r, err)\r\n}\r\n```\r\n\r\n### What did you expect to see?\r\n\r\n```\r\ninput \"MZXW6YTBOI\"\r\nDecodeString: \"foobar\" <nil>\r\nNewDecoder  : \"foobar\" <nil>\r\n```\r\n\r\n### What did you see instead?\r\n\r\n```\r\ninput \"MZXW6YTBOI\"\r\nDecodeString: \"foobar\" <nil>\r\nNewDecoder  : \"fooba\" unexpected EOF\r\n```\r\n\r\nBefore the fix for #25296:\r\n\r\n```\r\ninput \"MZXW6YTBOI\"\r\nDecodeString: \"foobar\" <nil>\r\nNewDecoder  : \"fooba\" <nil>\r\n```"}}
{"actor":{"display_login":"AxbB36"}}