Merge branch 'stable-2.10'
* stable-2.10: Fix login redirect for non default (root) context Conflicts: gerrit-httpd/src/main/java/com/google/gerrit/httpd/auth/become/BecomeAnyAccountLoginServlet.java Change-Id: I5b6479eeaaca467b68c568e7bd372e61198e2165
This commit is contained in:
@@ -344,14 +344,7 @@ public class Gerrit implements EntryPoint {
|
||||
token = token.substring(1);
|
||||
}
|
||||
|
||||
UrlBuilder builder = new UrlBuilder();
|
||||
builder.setProtocol(Location.getProtocol());
|
||||
builder.setHost(Location.getHost());
|
||||
String port = Location.getPort();
|
||||
if (port != null && !port.isEmpty()) {
|
||||
builder.setPort(Integer.parseInt(port));
|
||||
}
|
||||
return builder.buildString() + ("/login/" + URL.encodePathSegment("#/" + token));
|
||||
return selfRedirect("login/") + URL.encodePathSegment("#/" + token);
|
||||
}
|
||||
|
||||
public static String selfRedirect(String suffix) {
|
||||
|
||||
Reference in New Issue
Block a user