diff options
author | Derick Alangi <alangiderick@gmail.com> | 2024-11-08 21:57:14 +0300 |
---|---|---|
committer | Derick Alangi <alangiderick@gmail.com> | 2024-11-18 13:34:55 +0300 |
commit | 3824dc060398b2486cdce5e76e6d28e5f1fac90e (patch) | |
tree | 1440e7f907cabd45c030571097aceddd6cb267e0 /tests/phpunit/includes/api/query/ApiQueryContinueTest.php | |
parent | 0b2a169a7463127ff83b64e203f4b3f9def2fca7 (diff) | |
download | mediawikicore-3824dc060398b2486cdce5e76e6d28e5f1fac90e.tar.gz mediawikicore-3824dc060398b2486cdce5e76e6d28e5f1fac90e.zip |
[SUL3] skins: Special:(Userlogin|CreateAccount) pages in SUL3 mode
The patch fixes an issue with URL parameters being wrapped into the
returntoquery URL param when a user switches links from "Login" to
"Create account" or vice versa when on the shared domain during an
authentication flow. This is usually expected behavior but this is a
special case handling for URL generation on these specials pages when
we're in SUL3 mode.
This is because the token param will be wrapped into the returntoquery
param in the request URL, so it won't be directly visible in the URL
for the authentication providers to perform it's redirects during the
authentication flows. So for this special edge cases, we'll invoke
the `onAuthPreserveQueryParams` and generate the URL as if we're
making a new request everytime.
The URL parameters are not only preserved, but they're preserved in
such a way that they're not wrapped by `returntoquery` param and hence
they'll be visible to the WebRequest object as individual query params
for every single request between the signup and login pages.
Test plan
=========
0. SUL3 should be enabled
1. Visit any local wiki and click "Login"
You'll be redirected to the shared domain's login page at this
point
2. While you're on the shared domain, click "Create account"
3. Fill in the form for account creation and submit it.
4. The account should be created and you should be redirected to
the local wiki, then logged in successfully.
`@note`: You can also follow the steps above to test the reverse
when we switch from the "Create account" page to the "Login" page.
Without this patch, doing the above steps will not complete the
process as you'll be stuck on the shared domain without a redirect
for authentication completion because the token wasn't found to
continue the authentication flow (account creation).
Bug: T379295
Change-Id: Ic63f35640fbf4cbb4ad6196b0f3230e2d8c1ceb2
Diffstat (limited to 'tests/phpunit/includes/api/query/ApiQueryContinueTest.php')
0 files changed, 0 insertions, 0 deletions