8000 Merge pull request #90 from Wadeck/ACCESS_TOKEN_FIRST_RETRIEVAL · jpigree/github-oauth-plugin@6602105 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6602105

Browse files
authored
Merge pull request jenkinsci#90 from Wadeck/ACCESS_TOKEN_FIRST_RETRIEVAL
Potential bug in access_token retrieval method
2 parents e4eca7a + ac27663 commit 6602105

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
@@ -426,7 +426,7 @@ private String getAccessToken(@Nonnull String code) throws IOException {
426426
}
427427
String parts[] = content.split("&");
428428
for (String part : parts) {
429-
if (content.contains("access_token")) {
429+
if (part.startsWith("access_token=")) {
430430
String tokenParts[] = part.split("=");
431431
return tokenParts[1];
432432
}

0 commit comments

Comments
 (0)
0