mirror of
https://github.com/fiatjaf/khatru.git
synced 2025-03-17 21:32:55 +01:00
fix(blossom): respond with 401 on missing Auth
This commit is contained in:
parent
5e5a53240a
commit
c4d9ef1025
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
*.env
|
*.env
|
||||||
|
.idea/
|
||||||
knowledge.md
|
knowledge.md
|
||||||
|
@ -22,7 +22,7 @@ func (bs BlossomServer) handleUploadCheck(w http.ResponseWriter, r *http.Request
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if auth == nil {
|
if auth == nil {
|
||||||
blossomError(w, "missing \"Authorization\" header", 400)
|
blossomError(w, "missing \"Authorization\" header", 401)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if auth.Tags.GetFirst([]string{"t", "upload"}) == nil {
|
if auth.Tags.GetFirst([]string{"t", "upload"}) == nil {
|
||||||
@ -56,7 +56,7 @@ func (bs BlossomServer) handleUpload(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if auth == nil {
|
if auth == nil {
|
||||||
blossomError(w, "missing \"Authorization\" header", 400)
|
blossomError(w, "missing \"Authorization\" header", 401)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if auth.Tags.GetFirst([]string{"t", "upload"}) == nil {
|
if auth.Tags.GetFirst([]string{"t", "upload"}) == nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user