Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
remove useless char "?" at the end of redirect_uri
it's not compatible with gitlab-ce 12.5, gitlab will return 401 when trying to get access_token.
  • Loading branch information
zhangethan authored Jul 13, 2023
commit 2be28279a2d588c700f24cb1b6ec4a4f71430824
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");
return redirect_uri.toString();
}

Expand Down