Last modified: 2013-01-10 05:19:36 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 T22409, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 20409 - Server-level domain redirects double-encode special characters in query string
Server-level domain redirects double-encode special characters in query string
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Apache configuration (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Alex Monk
http://commons.wikipedia.org/w/api.ph...
:
: 42565 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-26 19:05 UTC by Roan Kattouw
Modified: 2013-01-10 05:19 UTC (History)
11 users (show)

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


Attachments

Comment 1 Brion Vibber 2009-09-03 01:37:03 UTC
A shorter test case...

OK  plain: http://commons.wikimedia.org/wiki/Category:Pf%C3%A4fers
OK  redir: http://commons.wikipedia.org/wiki/Category:Pf%C3%A4fers
        -> http://commons.wikimedia.org/wiki/Category:Pf%C3%A4fers

OK  plain: http://commons.wikimedia.org/w/index.php?title=Category:Pf%C3%A4fers
BAD redir: http://commons.wikipedia.org/w/index.php?title=Category:Pf%C3%A4fers
        -> http://commons.wikimedia.org/w/index.php?title=Category:Pf%25C3%25A4fers

Looks like the URL's path component gets passed through intact, but the query string arguments are getting an extra escaping applied... bleah :)

Seems to exist on other sites (eg en.wikipedia.com redir) so this probably affects all or most of our redirs. Mildly annoying; nice if we can fix it but not earth-shattering as such URLs should be rare.
Comment 2 Mark A. Hershberger 2011-03-06 21:30:11 UTC
Giving half of Fred's old bugs to Jeluf since I trust him to handle them or give them away if he can't.
Comment 3 Nemo 2012-08-23 18:25:50 UTC
Is this an apache configuration issue?
Comment 4 Roan Kattouw 2012-11-14 23:20:49 UTC
(In reply to comment #3)
> Is this an apache configuration issue?
Seems to be. The secure.wm.o redirects have this bug too for query strings, but not for paths:

https://secure.wikimedia.org/wikipedia/en/w/index.php?title=AT%26T
https://secure.wikimedia.org/wikipedia/en/wiki/AT%26T
Comment 5 Brad Jorsch 2012-11-15 01:13:34 UTC
This reminds me of a problem I ran into once that was solved with the [NE] flag on the rewrite rules. Without this flag, mod_rewrite tends to escape replacements on the right-hand side even if they were already properly escaped copied from the left.
Comment 6 Faidon Liambotis 2012-11-15 01:17:43 UTC
Indeed, this is the NE flag; this has been fixed for secure.wm.org as of 10 minutes ago.
Comment 7 Andre Klapper 2012-11-19 10:44:25 UTC
(In reply to comment #6)
> Indeed, this is the NE flag; this has been fixed for secure.wm.org as of 10
> minutes ago.

Does that only refer to comment 5, or to the issue reported in this bug (which could be closed as FIXED then)?
Comment 8 Faidon Liambotis 2012-11-19 15:00:40 UTC
It fixes only the secure.wm.org part (comment 4). I'll try to recruit some help for the rest, as it's going to be more time-consuming than I can handle right now.
Comment 9 Alex Monk 2012-11-19 19:43:16 UTC
Gerrit change #34113
Comment 10 Alex Monk 2012-11-30 16:20:27 UTC
*** Bug 42565 has been marked as a duplicate of this bug. ***
Comment 11 Alex Monk 2012-12-09 17:40:42 UTC
Assigned to me because I put the change up for review, but realistically the patch is currently blocked by Tim Starling's suggestion that it be based on I2c6ab07d (Jeremyb's make redirects protocol-relative where possible patch), which needs rebasing on top of master first I think.
Comment 12 Faidon Liambotis 2012-12-09 18:06:02 UTC
That's a great suggestion. I'd be happy to help review both yours and jeremyb's patches and merge them (ideally cleaning up the redirects too :). Put me as a reviewer and/or ping me on IRC.

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


Navigation
Links