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.
This commit is contained in:
James Elliott 2021-05-21 22:03:44 +10:00 committed by GitHub
parent a56cffa129
commit c62dbd43d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}