Skip to content

Commit

Permalink
Merge branch '5.8.x' into 6.1.x
Browse files Browse the repository at this point in the history
Closes gh-14921
  • Loading branch information
jzheaux committed Apr 17, 2024
2 parents 8a03482 + 657760a commit ade4577
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private RequestMatcherDelegatingAuthorizationManager(
@Override
public AuthorizationDecision check(Supplier<Authentication> authentication, HttpServletRequest request) {
if (this.logger.isTraceEnabled()) {
this.logger.trace(LogMessage.format("Authorizing %s", request));
this.logger.trace(LogMessage.format("Authorizing %s", requestLine(request)));
}
for (RequestMatcherEntry<AuthorizationManager<RequestAuthorizationContext>> mapping : this.mappings) {

Expand All @@ -77,7 +77,7 @@ public AuthorizationDecision check(Supplier<Authentication> authentication, Http
if (matchResult.isMatch()) {
AuthorizationManager<RequestAuthorizationContext> manager = mapping.getEntry();
if (this.logger.isTraceEnabled()) {
this.logger.trace(LogMessage.format("Checking authorization on %s using %s", request, manager));
this.logger.trace(LogMessage.format("Checking authorization on %s using %s", requestLine(request), manager));
}
return manager.check(authentication,
new RequestAuthorizationContext(request, matchResult.getVariables()));
Expand All @@ -89,6 +89,10 @@ public AuthorizationDecision check(Supplier<Authentication> authentication, Http
return DENY;
}

private static String requestLine(HttpServletRequest request) {
return request.getMethod() + " " + UrlUtils.buildRequestUrl(request);
}

/**
* Creates a builder for {@link RequestMatcherDelegatingAuthorizationManager}.
* @return the new {@link Builder} instance
Expand Down

0 comments on commit ade4577

Please sign in to comment.