Skip to content
Permalink
Browse files Browse the repository at this point in the history
fix(handlers): align response status codes for the verify endpoint (#…
…2016)

This aligns all response status codes on the /api/verify endpoint when an error occurs, making it impossible to determine the actual reason for the failure.
  • Loading branch information
james-d-elliott committed May 21, 2021
1 parent a56cffa commit c62dbd4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/handlers/handler_verify.go
Expand Up @@ -428,7 +428,9 @@ func VerifyGet(cfg schema.AuthenticationBackendConfiguration) middlewares.Reques
targetURL, err := ctx.GetOriginalURL()

if err != nil {
ctx.Error(fmt.Errorf("Unable to parse target URL: %s", err), operationFailedMessage)
ctx.Logger.Error(fmt.Errorf("Unable to parse target URL: %s", err))
ctx.ReplyUnauthorized()

return
}

Expand Down

0 comments on commit c62dbd4

Please sign in to comment.