Skip to content

Commit

Permalink
Merge pull request #116 from zhangethan/master
Browse files Browse the repository at this point in the history
remove useless char "?" at the end of redirect_uri
  • Loading branch information
krisstern authored Jul 13, 2023
2 parents ca26368 + 2be2827 commit d6a226f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/org/jenkinsci/plugins/GitLabSecurityRealm.java
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,9 @@ public HttpResponse doCommenceLogin(StaplerRequest request, @QueryParameter Stri

private String buildRedirectUrl(StaplerRequest request) throws MalformedURLException {
URL currentUrl = new URL(Jenkins.get().getRootUrl());
List<NameValuePair> parameters = new ArrayList<>();

URL redirect_uri = new URL(currentUrl.getProtocol(), currentUrl.getHost(), currentUrl.getPort(),
request.getContextPath() + "/securityRealm/finishLogin?" + URLEncodedUtils.format(parameters, StandardCharsets.UTF_8));
request.getContextPath() + "/securityRealm/finishLogin");

Check warning on line 295 in src/main/java/org/jenkinsci/plugins/GitLabSecurityRealm.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 295 is not covered by tests
return redirect_uri.toString();
}

Expand Down

0 comments on commit d6a226f

Please sign in to comment.