Last modified: 2011-12-14 03:35:59 UTC
After upgrade from MediaWiki 1.17 to 1.18 I can't download anymore pdf files which contains ' (URL encoded as %27) in filename. Apache web server say too many redirects (configured default 10) and file name generates as 'filename'.pdf?&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&* I'm using img_auth.php method getting files.
Well that's interesting. When testing this http://localhost/w/phase3/index.php?title=File:%27test%27.pdf went to image page as it was supposed to, but http://localhost/w/phase3/index.php/File:%27Ntest%27.pdf did not. (Not directly same as your issue, but probably related)
(In reply to comment #1) > Well that's interesting. When testing this > http://localhost/w/phase3/index.php?title=File:%27test%27.pdf went to image > page as it was supposed to, but > http://localhost/w/phase3/index.php/File:%27Ntest%27.pdf did not. (Not directly > same as your issue, but probably related) Or actually ignore that. Seems to have fixed itself. ---- Getting back to your issue. It seems like you need more then just the quote, you also need a period. Steps to reproduce: *enable img_auth.php *upload a file named 'IIMV4.1'.pdf *Look at the redirect loop created by img_auth
cc'ing Tim since he was involved in the IE extension stuff. So what seems to happen in my test (using file name 'IIMV4.1'.pdf ) *$_SERVER['PATH_INFO'] for some reason is "/0/01/?IIMV4.1?.pdf" (why the ' turns into a ? i'm unsure) *First ? is ignored as not a possible extension, because isn't precedeeded by a period *Second ? is considered terminating an extension (Aka thinks file has extension .1), so now checks that extension, see's its not in the whitelist (Since not .pdf) *MW tries to redirect the request adding &* to the end. *Since the actual url has ' in it instead of ?, the redirected url is detected as being ok as far as IE extension is concerned, so it thinks this won't create a loop. *And then we repeat. I suppose we should make the redirect loop check also check to see if the url already ends in a &*, but I'm not sure if its normal for PATH_INFO to have the weirdness of ' being replaced by ? and if some programming around that is needed.