https://bugzilla.wikimedia.org/show_bug.cgi?id=28235

Damian <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #15 from Damian <[email protected]> 2011-11-11 03:58:12 UTC 
---
Hello, I just started setting up private MediaWiki (v1.17.0) and I was going
through the steps to make images not load using direct linking for non-logged
in users. I managed to set up img_auth.php to handle the image requests and
this worked for the actual image files in /images but thumbnails no longer
worked. I kept getting a "Forbidden" error: "Invalid file extension found in
the path info or query string.".

After playing around a bit and looking at img_auth.php more closely I noticed
that on line 52, right under: "// Check for bug 28235: QUERY_STRING overriding
the correct extension", $dotPos was being set to: strpos( $path, '.' ). But
thumbnail URLs include the file extension in the thumbnail images folder name
(as well as the file extension of the files themselves). strpos would therefore
return the position of the wrong dot.

Changing strpos to strrpos fixed this and I can now access thumbnails via
img_auth.php. 

I'm not sure if this has been fixed already nor how to fix it myself (if that's
even possible) so I though I'd let someone know. It could also be that I
configured something else wrong and this is a hack...

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to