zulip/static/js/portico
Tim Abbott ab2ef76baa login: Fix hash being lost with redirects.
This fixes the following flow being broken:

* You start on
  http://zulipdev.com:9991/accounts/go/?next=/upgrade%23sponsorship
  (which we link to from e.g. /plans/)

* The form on that page has
  `action=/accounts/go/?next=%2Fupgrade%23sponsorship`, i.e. it has correctly
  URL-encoded the `next `value.

* You enter a realm name and hit submit.

* That redirects you to
  `http://realm-26.zulipdev.com:9991/upgrade#sponsorship`, would is
  correct if you are already logged in.

* However, if you're not logged in, `/upgrade` will serve a redirect
  to the login page, landing you at
  `http://realm-26.zulipdev.com:9991/devlogin/?next=/upgrade/#sponsorship`.
  This page works.  But in production, it would instead be:
  `http://realm-26.zulipdev.com:9991/login/?next=/upgrade/#sponsorship`.
  On this page, password login works but social login does not.
  Note that the `next=` value is no longer URL-encoded, and thus is
  parsed by the browser as `?next=/upgrade` + a hash of
  `#sponsorship`.

* If you now login with Google auth, you find yourself on
  `http://realm-26.zulipdev.com:9991/#sponsorship` (no /upgrade).

The root cause was that we have a bit of JavaScript in signup.js and
dev-login.js that is intended to handle this; but it was broken for
the social login case for unknown legacy reasons.

This bug appears to date from the original
b62bdde303 which introduced `next`
support for social backends in the first place.
2021-07-24 09:50:15 -07:00
..
confirm-preregistrationuser.js js: Use jQuery as a module. 2021-03-12 10:08:25 -08:00
desktop-login.js js: Convert static/js/portico/desktop-login.js to ES6 module. 2021-02-10 10:27:14 -08:00
desktop-redirect.js js: Convert static/js/portico/desktop-redirect.js to ES6 module. 2021-02-10 10:27:14 -08:00
dev-login.js js: Use jQuery as a module. 2021-03-12 10:08:25 -08:00
email_log.js js: Use jQuery as a module. 2021-03-12 10:08:25 -08:00
google-analytics.js js: Convert static/js/page_params.js to ES6 module. 2021-03-26 10:17:56 -07:00
header.js landing_page: Fix top navigation dropdowns for mobile screens. 2021-07-20 11:33:56 -07:00
help.js landing_page: Fix anchor links on landing pages. 2021-07-23 10:29:41 -07:00
integrations.js integrations: Use e.key instead of deprecated e.which. 2021-06-02 14:04:53 -07:00
integrations_dev_panel.js docs: Fix capitalization mistakes. 2021-05-10 09:57:26 -07:00
landing-page.js landing_page: Fix anchor links on landing pages. 2021-07-23 10:29:41 -07:00
signup.js login: Fix hash being lost with redirects. 2021-07-24 09:50:15 -07:00
tabbed-instructions.js js: Use jQuery as a module. 2021-03-12 10:08:25 -08:00
team.js js: Convert static/js/page_params.js to ES6 module. 2021-03-26 10:17:56 -07:00