diff options
Diffstat (limited to 'java/com/google/gerrit/httpd/auth/openid/OpenIdServiceImpl.java')
-rw-r--r-- | java/com/google/gerrit/httpd/auth/openid/OpenIdServiceImpl.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/java/com/google/gerrit/httpd/auth/openid/OpenIdServiceImpl.java b/java/com/google/gerrit/httpd/auth/openid/OpenIdServiceImpl.java index be975c5e99..b685011744 100644 --- a/java/com/google/gerrit/httpd/auth/openid/OpenIdServiceImpl.java +++ b/java/com/google/gerrit/httpd/auth/openid/OpenIdServiceImpl.java @@ -477,8 +477,9 @@ class OpenIdServiceImpl { final StringBuilder rdr = new StringBuilder(); rdr.append(urlProvider.get(req)); String nextToken = Url.decode(token); - if (isNew && !token.startsWith(PageLinks.REGISTER + "/")) { - rdr.append('#' + PageLinks.REGISTER); + String registerUri = PageLinks.REGISTER + "/"; + if (isNew && !token.startsWith(registerUri)) { + rdr.append('#' + registerUri); if (nextToken.startsWith("#")) { // Need to strip the leading # off the token to fix registration page redirect nextToken = nextToken.substring(1); |