Merge pull request #19115 from edx/douglashall/allow_login_redirect_to_subdomain

Allow redirects to subdomains after login.
This commit is contained in:
Douglas Hall
2018-10-17 09:03:40 -04:00
committed by GitHub
2 changed files with 1 additions and 14 deletions

View File

@@ -217,16 +217,6 @@
expect(view.redirect).toHaveBeenCalledWith(FORWARD_URL);
});
it('ignores redirect to external URLs', function() {
ajaxSpyAndInitialize(this, 'register', 'http://www.example.com');
// Trigger auth complete
view.subview.register.trigger('auth-complete');
// Expect that we ignore the external URL and redirect to the dashboard
expect(view.redirect).toHaveBeenCalledWith('/dashboard');
});
it('hides create an account section', function() {
ajaxSpyAndInitialize(this, 'login', '', '', false);

View File

@@ -56,10 +56,7 @@
this.accountActivationMessages = options.account_activation_messages || [];
if (options.login_redirect_url) {
// Ensure that the next URL is internal for security reasons
if (! window.isExternal(options.login_redirect_url)) {
this.nextUrl = options.login_redirect_url;
}
this.nextUrl = options.login_redirect_url;
}
this.formDescriptions = {