Last modified: 2013-01-10 05:19:36 UTC
http://commons.wikimedia.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Pf%C3%A4fers&cmlimit=500&format=xml works fine, but visiting http://commons.wikipedia.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Pf%C3%A4fers&cmlimit=500&format=xml redirects to http://commons.wikihttp://commons.wikimedia.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Pf%C3%A4fers&cmlimit=500&format=xmlmedia.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Pf%25C3%25A4fers&cmlimit=500&format=xml , which has the %C3%A4 double-encoded to %25C3%25A4
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.
Giving half of Fred's old bugs to Jeluf since I trust him to handle them or give them away if he can't.
Is this an apache configuration issue?
(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
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.
Indeed, this is the NE flag; this has been fixed for secure.wm.org as of 10 minutes ago.
(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)?
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.
Gerrit change #34113
*** Bug 42565 has been marked as a duplicate of this bug. ***
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.
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.