fix: deny locations with invalid auth-url annotation (#8256)
* fix: deny locations with invalid auth-url annotation Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com> * Delete duplicate test Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
This commit is contained in:
parent
f3698d0445
commit
1e2ce80846
4 changed files with 35 additions and 48 deletions
|
|
@ -164,7 +164,7 @@ func (a authReq) Parse(ing *networking.Ingress) (interface{}, error) {
|
|||
|
||||
authURL, err := parser.StringToURL(urlString)
|
||||
if err != nil {
|
||||
return nil, ing_errors.InvalidContent{Name: err.Error()}
|
||||
return nil, ing_errors.LocationDenied{Reason: fmt.Errorf("could not parse auth-url annotation: %v", err)}
|
||||
}
|
||||
|
||||
authMethod, _ := parser.GetStringAnnotation("auth-method", ing)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue