Adds missing break in header authentication

This commit is contained in:
Ysbrand van Eijck 2021-12-08 13:48:13 +01:00
parent 3ddc711cc1
commit fc9da8e1f3
No known key found for this signature in database
GPG Key ID: 73EEE5542E80F6C7

View File

@ -276,9 +276,10 @@ func main() {
user = strings.TrimLeft(name, prefix)
pass = values[0]
ok = true
break
}
}
if !(ok && authenticate(user, pass)) {
w.Header().Set("WWW-Authenticate", `Basic realm="widdler"`)
http.Error(w, "Unauthorized", http.StatusUnauthorized)