Skip to content

Commit 83f1c96

Browse files
Don't change host:port in redirect after successful login
1 parent 4b8ee98 commit 83f1c96

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

core/src/org/labkey/core/login/LoginController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,8 @@ else if (form.getTermsOfUseType() == TermsOfUseType.SITE_WIDE)
672672
response.put("approvedTermsOfUse", true);
673673
}
674674

675-
// Use the full hostname in the URL if we have one, otherwise just go with a local URI
676-
String redirectString = redirectUrl.getHost() != null && redirectUrl.getScheme() != null ? redirectUrl.getURIString() : redirectUrl.toString();
675+
// Use relative path. If the host in the URL changes then our session won't follow us, and we won't be logged in (that kinda defeats the purpose of this API)
676+
String redirectString = redirectUrl.getLocalURIString();
677677

678678
if (null != user)
679679
{

0 commit comments

Comments
 (0)