Skip to content

Commit

Permalink
Compare username based on ID strategy on token refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
eva-mueller-coremedia authored Sep 10, 2024
1 parent d925bf7 commit a5a97f8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1516,7 +1516,7 @@ private boolean handleTokenRefreshResponse(

String username = determineStringField(userNameFieldExpr, parsedIdToken, userInfo);

if (!expectedUsername.equals(username)) {
if (!User.idStrategy().equals(expectedUsername, username)) {

Check warning on line 1519 in src/main/java/org/jenkinsci/plugins/oic/OicSecurityRealm.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 1519 is only partially covered, one branch is missing
httpResponse.sendError(
HttpServletResponse.SC_UNAUTHORIZED, "User name was not the same after refresh request");
return false;
Expand Down

0 comments on commit a5a97f8

Please sign in to comment.