Skip to content

Commit

Permalink
Merge pull request #394 from eva-mueller-coremedia/patch-1
Browse files Browse the repository at this point in the history
Compare username based on ID strategy on token refresh
  • Loading branch information
michael-doubez authored Sep 18, 2024
2 parents 4228c6f + a5a97f8 commit db7d59e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1546,7 +1546,7 @@ private boolean handleTokenRefreshResponse(

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

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

Check warning on line 1549 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 1549 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 db7d59e

Please sign in to comment.