8000 corrected string comparison of username · ojacques/github-oauth-plugin@6c9f6d9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6c9f6d9

Browse files
Wadeckagentgonzo
andauthored
corrected string comparison of username
Co-Authored-By: agentgonzo <sarch@cloudbees.com>
1 parent c47e778 commit 6c9f6d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/jenkinsci/plugins/GithubSecurityRealm.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ public UserDetails loadUserByUsername(String username)
659659

660660
Authentication token = SecurityContextHolder.getContext().getAuthentication();
661661

662-
if (token == null || username != token.getPrincipal()) {
662+
if (token == null || !username.equals(token.getPrincipal())) {
663663
if(localUser != null && GithubSecretStorage.contains(localUser)){
664664
String accessToken = GithubSecretStorage.retrieve(localUser);
665665
try {

0 commit comments

Comments
 (0)
0