fix(auth): reject request body on session creation
This commit is contained in:
@@ -27,6 +27,10 @@ func (h *AuthHandler) CreateSession(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if !httpx.RejectBody(w, r, requestID) {
|
||||
return
|
||||
}
|
||||
|
||||
session, err := h.service.Login(r.Context(), username, plain)
|
||||
if errors.Is(err, service.ErrInvalidCredentials) {
|
||||
httpx.WriteUnauthorized(w, httpx.BasicChallenge, requestID)
|
||||
|
||||
Reference in New Issue
Block a user