Skip to content

Commit a9502ea

Browse files
committed
Fix lint
1 parent c85e24e commit a9502ea

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

routers/web/auth/oauth.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,15 @@ func GrantApplicationOAuth(ctx *context.Context) {
571571
}, form.RedirectURI)
572572
return
573573
}
574+
} else if grant.Scope != form.Scope {
575+
handleAuthorizeError(ctx, AuthorizeError{
576+
State: form.State,
577+
ErrorDescription: "a grant exists with different scope",
578+
ErrorCode: ErrorCodeServerError,
579+
}, form.RedirectURI)
580+
return
574581
}
582+
575583
if len(form.Nonce) > 0 {
576584
err := grant.SetNonce(ctx, form.Nonce)
577585
if err != nil {

0 commit comments

Comments
 (0)