mirror of
https://github.com/MarekWojt/gertdns.git
synced 2025-12-15 12:59:53 +01:00
fix missing text on auth/internal failure
This commit is contained in:
@@ -190,11 +190,13 @@ func authenticatedRequest(request func(ctx *fasthttp.RequestCtx)) func(ctx *fast
|
|||||||
|
|
||||||
authenticated, err := auth.IsPasswordAuthenticated(authRequest)
|
authenticated, err := auth.IsPasswordAuthenticated(authRequest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
ctx.WriteString("Internal server error")
|
||||||
ctx.SetStatusCode(fasthttp.StatusInternalServerError)
|
ctx.SetStatusCode(fasthttp.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if !authenticated {
|
if !authenticated {
|
||||||
|
ctx.WriteString("Authentication failed")
|
||||||
ctx.SetStatusCode(fasthttp.StatusForbidden)
|
ctx.SetStatusCode(fasthttp.StatusForbidden)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user