Отвечать 400 и 401 вместо 500 на NUL и невалидный UTF-8 во входных данных
This commit is contained in:
@@ -54,6 +54,8 @@ func TestLoginFailuresAreUniformBasicChallenges(t *testing.T) {
|
||||
"bearer scheme": {"Authorization": "Bearer " + strings.Repeat("A", 43)},
|
||||
"not base64": {"Authorization": "Basic !!!"},
|
||||
"no colon": {"Authorization": "Basic " + encoded("alice")},
|
||||
"nul username": basic("a\x00b", testPassword),
|
||||
"non-utf-8 name": basic("\xff\xfe", testPassword),
|
||||
}
|
||||
messages := map[string]string{}
|
||||
for name, headers := range cases {
|
||||
|
||||
Reference in New Issue
Block a user