Skip to content

Commit 7d6bdfe

Browse files
committed
Add Null Guard for Authorization Result
1 parent a683a3a commit 7d6bdfe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/src/main/java/org/springframework/security/web/webauthn/registration/PublicKeyCredentialCreationOptionsFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse
105105
Supplier<SecurityContext> context = this.securityContextHolderStrategy.getDeferredContext();
106106
Supplier<Authentication> authentication = () -> context.get().getAuthentication();
107107
AuthorizationResult result = this.authorization.authorize(authentication, request);
108-
if (!result.isGranted()) {
108+
if (result == null || !result.isGranted()) {
109109
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
110110
return;
111111
}

0 commit comments

Comments
 (0)