I've noticed that my wiki is asking Users to login to upload a file when that user is already logged in. This is triggered when a logged in User adds a wikilink to an image such as [ [image:billy-bob.jpg]] to a page prior to the image being uploaded, page is saved, and image link is clicked to upload the file. At this point, the File Upload page appears and the User is logged out.
Is this a known bug, as I can't seem to find it anywhere.
Thanks Bill
On Mon, Feb 7, 2011 at 12:04 PM, Bill Traynor btraynor@gmail.com wrote:
I've noticed that my wiki is asking Users to login to upload a file when that user is already logged in. This is triggered when a logged in User adds a wikilink to an image such as [ [image:billy-bob.jpg]] to a page prior to the image being uploaded, page is saved, and image link is clicked to upload the file. At this point, the File Upload page appears and the User is logged out.
What version of MediaWiki are you running? Is the user actually logged out, or is there just something that makes it look that way? Does the user stay logged out if they continue doing other things on the wiki instead of following whatever this is? Has the user interface been customized; might a login link be some custom addition by one of your wiki's admin users? Does this happen when following the 'Upload' link on the sidebar as well? Is there anything about the authentication or session configuration that might be unusual? Are there any extensions or customized code? Is this a publicly-accessible site that other people could test on to help diagnose the problem, and if so what's the URL to the site?
-- brion
On Mon, Feb 7, 2011 at 15:28, Brion Vibber brion@pobox.com wrote:
On Mon, Feb 7, 2011 at 12:04 PM, Bill Traynor btraynor@gmail.com wrote:
I've noticed that my wiki is asking Users to login to upload a file when that user is already logged in. This is triggered when a logged in User adds a wikilink to an image such as [ [image:billy-bob.jpg]] to a page prior to the image being uploaded, page is saved, and image link is clicked to upload the file. At this point, the File Upload page appears and the
User
is logged out.
What version of MediaWiki are you running?
Version 1.16.0
Is the user actually logged out, or is there just something that makes it look that way?
I don't think the user is actually logged out as far as I can tell. When I get to the Not logged In page, I can click on a left nav link back to the Main page and I appear logged in again.
Does the user stay
logged out if they continue doing other things on the wiki instead of following whatever this is?
No, I don't believe so.
Has the user interface been customized; might a login link be some custom addition by one of your wiki's admin users?
Possibly, I'm investigating this now.
Does this happen when following the 'Upload' link on the sidebar as well?
No, it does not, but I think our URL rewrite rules may have something to do with this issue. A link from a File mediawiki link looks like this: http://elinux.org/index.php?title=Special:Upload&wpDestFile=Android_test...
Does that URL look ok?
NOTE: You can see this test at the bottom of the page here: http://elinux.org/Sandbox http://elinux.org/Sandbox
Is there anything about the authentication or session configuration that might be unusual?
No, the authentication and session configuration are stock.
Are there any extensions or customized code?
The extensions installed can be seen here: http://elinux.org/Special:Version but I don't suspect any of them yet.
Is this a publicly-accessible site that other people could test on to help diagnose the problem, and if so what's the URL to the site?
Yes, http://elinux.org/Main_Page http://elinux.org/Main_Page
-- brion _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On Wed, Feb 9, 2011 at 5:15 AM, Bill Traynor btraynor@gmail.com wrote:
On Mon, Feb 7, 2011 at 15:28, Brion Vibber brion@pobox.com wrote:
Does this happen when following the 'Upload' link on the sidebar as well?
No, it does not, but I think our URL rewrite rules may have something to do with this issue. A link from a File mediawiki link looks like this:
http://elinux.org/index.php?title=Special:Upload&wpDestFile=Android_test...
Does that URL look ok?
Yes, that looks fine. Hmm... some quick testing:
no login: http://elinux.org/index.php?title=Special:Upload&wpDestFile=Android_test... ok login: http://elinux.org/index.php?title=Special:Upload&wpDestFile=Android_test...
ok login: http://elinux.org/Empty_page ok login: http://elinux.org/Empty_page_png no login: http://elinux.org/Empty_page.png ok login: http://elinux.org/Empty_page.abc no login: http://elinux.org/Empty_page.txt
Might there be some kind of rule that's eating cookies if the URL (including query string) ends in what looks like a static file extension?
-- brion
On Wed, Feb 9, 2011 at 16:13, Brion Vibber brion@pobox.com wrote:
On Wed, Feb 9, 2011 at 5:15 AM, Bill Traynor btraynor@gmail.com wrote:
On Mon, Feb 7, 2011 at 15:28, Brion Vibber brion@pobox.com wrote:
Does this happen when following the 'Upload' link on the sidebar as well?
No, it does not, but I think our URL rewrite rules may have something to
do
with this issue. A link from a File mediawiki link looks like this:
http://elinux.org/index.php?title=Special:Upload&wpDestFile=Android_test...
Does that URL look ok?
Yes, that looks fine. Hmm... some quick testing:
no login:
http://elinux.org/index.php?title=Special:Upload&wpDestFile=Android_test... ok login:
http://elinux.org/index.php?title=Special:Upload&wpDestFile=Android_test...
ok login: http://elinux.org/Empty_page ok login: http://elinux.org/Empty_page_png no login: http://elinux.org/Empty_page.png ok login: http://elinux.org/Empty_page.abc no login: http://elinux.org/Empty_page.txt
Might there be some kind of rule that's eating cookies if the URL (including query string) ends in what looks like a static file extension?
It turned out to be an issue with the Varnish Cache. Varnish noticed the .jpg or .png or whatever so it assumed it was an image (because Varnish had a rule to assume as much) and therefore cached the upload page.
The admin added an exception triggered by the "Special:Upload" string in the URL.
-- brion _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On Wed, Feb 9, 2011 at 3:00 PM, Bill Traynor btraynor@gmail.com wrote:
It turned out to be an issue with the Varnish Cache. Varnish noticed the .jpg or .png or whatever so it assumed it was an image (because Varnish had a rule to assume as much) and therefore cached the upload page.
The admin added an exception triggered by the "Special:Upload" string in the URL.
You should consider one of the following: * adjust the web server to send proper caching headers for those files, which Varnish can then respect. (the web server knows the difference between static files and things going through PHP; it can also simply base its settings on directories or file types) * or at least, adjust the Varnish check to check for the actual Content-Type rather than assume it knows anything about URLs * and if URLs must be checked, be aware of the difference between paths and query strings :D
Other pages on the wiki may also have names ending in ".png" etc, such as the actual file description pages, and they also should not be interfered with.
-- brion
mediawiki-l@lists.wikimedia.org