The parameter setlang should use [[Post/Redirect/Get]].
Description
Details
- Reference
- bz44649
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Do not use setlang to change user language | mediawiki/extensions/UniversalLanguageSelector | master | +32 -8 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | abi_ | T63115 Remove 'setlang' query parameter feature from ULS | |||
Open | None | T111990 Deprecate setlang GET parameter | |||
Resolved | Fomafix | T46649 Language change should use POST |
Event Timeline
The "parameter" cannot use anything, since the user can type it in himself as well.
Redirect introduces latency, and the usual reasons (avoiding double forms submission) don't seem to apply here.
POST instead of GET for setlang
setlang changes a setting so it should use POST instead of GET.
A simple POST without redirect would also be possible. See patch.
But with a simple POST the problems described in [[Post/Redirect/Get]] still exist.
Attached:
I don't understand what is the advantage of doing this. Can anybody explain? If there is no clear advantage, I'd go for WONTFIX.
Change 110360 had a related patch set uploaded by Gerrit Patch Uploader:
(Bug 44649) Use POST instead of GET with setlang to change user settings
Change 110360 had a related patch set uploaded by Gerrit Patch Uploader:
Use POST instead of GET with setlang to change user settings
Change 110360 had a related patch set uploaded (by Gerrit Patch Uploader):
Do not use setlang to change user language
Setlang still doesn't use POST/redirect/GET. That means history navigation, closing and reopening a browser with multiple tags etc. will change user settings.
@Tgr ULS no longer uses setlang itself, so for that reason I consider this fixed. There are probably links with setlang sprinkled everywhere in many wikis, and we do not want to break them, so setlang itself is still recognized and supported.
I am not sure whether redirecting GET to POST and that back to GET is worth it. Do you have an opinion on that? If yes, can we use a new bug for that?
A language change uses now a POST to the api.php and then a GET. This was the intension of this task.
The URL parameter setlang is not used anymore in ULS but still supported.