Last modified: 2011-06-05 10:44:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29606, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27606 - 'from' parameter of rollback urls in the web interface include '+' signs (wrong encoding)
'from' parameter of rollback urls in the web interface include '+' signs (wro...
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-21 11:29 UTC by Krinkle
Modified: 2011-06-05 10:44 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Krinkle 2011-02-21 11:29:11 UTC
Example url:


http://www.mediawiki.org/w/index.php?title=Manual:$wgInvalidateCacheOnLocalSettingsChange&action=rollback&from=Jack+Phoenix&token=foo1234

"Jack+Phoenix" should either have been "Jack%20Phoenix" (rawurlencode) or Jack_Phoenix (wfUrlencode).

This is causing javascript gadgets to fail from time to time when the username contains a space.

Although I think we just didn't notice it before, it could be regression in 1.17 since 1.16wmf4.
Comment 1 AlexSm 2011-02-21 19:32:34 UTC
Looks like "+" is used in a lot of places, compare this:
/wiki/Contributions/A_b
w/index.php?title=Special:Contributions...&target=A+b
w/index.php?title=Special:Log...&page=A+b

This works fine for MediaWiki itself so I'm not sure you can call it a bug.
Comment 2 Derk-Jan Hartman 2011-02-21 21:55:49 UTC
you can, because we also have pagenames with + in them, so we really shouldn't use + as an escape char.
Comment 3 Brion Vibber 2011-02-22 18:25:48 UTC
"+" is perfectly 100% normal URL form encoding for a space, and is always correct in this circumstance. Code that is attempting to pull URL query string parameters but doesn't know how to decode URL form encoding needs to be fixed.
Comment 4 Krinkle 2011-02-22 18:53:50 UTC
(In reply to comment #3)
> "+" is perfectly 100% normal URL form encoding for a space, and is always
> correct in this circumstance. Code that is attempting to pull URL query string
> parameters but doesn't know how to decode URL form encoding needs to be fixed.

Agreed (after IRC elucidation by brion). wfUrlEncode is only to be used for 'nice' urls in the core (ie. /wiki/Page:Name_here or Special:Contributions/John_Doe.

query formed links are always with urlencode and encode spaces with '+', this is consistent throughout the core, such as on : http://www.mediawiki.org/wiki/User:Jack_Phoenix the sidebar links to http://www.mediawiki.org/w/index.php?title=Special:Log&user=Jack+Phoenix

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links