Re: MediaWiki and Anubis
Philip Teyssier via MediaWiki-l <[email protected]>
| Newsgroups | gmane.org.wikimedia.mediawiki |
|---|---|
| Message-ID | <[email protected]> |
Dear All, I want to share my experience with ChatGBT in order to help others. I have been using ChatGBT to help me with my MediaWiki questions and it is surprisingly helpful. I had some CSS issues along with my queries rending correctly. So for self-interest, I plugged Joern's issue into it and this is what came back: --- Yes, this is plausible, and I would look at Anubis first rather than MediaWiki. The strongest clue is that Firefox works but Chrome is blocked immediately. Anubis has had browser/challenge compatibility issues, and its current release history specifically mentions extensive testing against many Chrome versions. Version 1.26.0 says it was tested across many Google Chrome versions and should support Chrome 69+, and the current release is 1.26.2 as of July 27, 2026. If you're running an older Anubis, upgrading would be my first step. Anubis also relies on JavaScript plus a cookie/session after the proof-of-work challenge. There have been reported bugs where valid browsers get treated as though they cannot accept the cookie, or where the browser passes the challenge but then gets challenged again for subsequent resources such as CSS. So the symptom can look like an Apache or MediaWiki failure even though the request never really reaches MediaWiki normally. I would troubleshoot it in this order: 1. Check the Anubis version. If it isn't 1.26.2, update it first. Chrome support received explicit work in the 1.26.x series. 2. In Chrome, open Developer Tools → Network, clear the log, then request the wiki. Look particularly at requests to paths under: /.within.website/ 3. Those are Anubis requests, not MediaWiki. If one of those returns 403, loops, or fails to set a cookie, you've localized the problem. Look at Application → Cookies in Chrome and compare it to Firefox after successfully passing the challenge. If Firefox gets the Anubis authentication cookie and Chrome does not, I'd investigate cookie attributes, privacy settings, or an extension before touching MediaWiki. 4. Test Chrome in a new Incognito window with extensions disabled. If that works, something in the normal Chrome profile is interfering with Anubis JavaScript/cookies. 5. Watch the Anubis log while making one Chrome request. The specific Anubis error is much more useful than the Apache access log. There have been prior Anubis failures producing errors such as can't get challenge, as well as challenge loops. I would also verify the Apache reverse-proxy arrangement, especially that Anubis knows the public request is HTTPS and receives the expected Host / X-Forwarded-* information. A cookie generated under the wrong host/scheme can create exactly the kind of browser-dependent behavior you're describing. One other point: MediaWiki itself should not care whether the request came through Chrome or Firefox at this stage. Anubis sits in front of it and evaluates requests before proxying them to the wiki. Its default policy is intentionally aggressive and normally challenges anything that looks like a browser, typically based on Mozilla in the User-Agent. Therefore if Chrome never gets beyond the Anubis screen, debugging MediaWiki's PHP configuration probably won't tell you much. If I were replying to that mailing-list post, I'd probably say: upgrade Anubis first, then compare Chrome's /.within.website/ requests and Anubis cookies against Firefox, and capture the corresponding Anubis log entry. Those three things will probably identify the cause quickly. If you give me the Anubis version and the relevant Apache ProxyPass/VirtualHost configuration, I can look at the setup and tell you what I would change --- Philip Teyssier [email protected] -----Original Message----- From: Clausen, Jörn via MediaWiki-l <[email protected]> Sent: Friday, August 14, 2026 6:33 AM To: Clausen, Jörn via MediaWiki-l <[email protected]> Cc: Clausen, Jörn <[email protected]> Subject: [MediaWiki-l] Re: MediaWiki and Anubis I hate it when I have to answer my own questions. Although this is only a partial answer... When browsing the wikis using Chrome, the logs show access from 127.0.0.1, directly followed by access from the real IP address of the client. This is not seen when using Firefox, in that case only the real IP address is logged. Some of my wikis are restricted to my campus network - which does not include 127.0.0.1. After I added that address to the whitelist, Chrome was also able to access the wikis through Anubis. The question why Anubis behaves so differently with Firefox and Chrome as clients is still open, but probably one for the Anubis community. If someone here has any idea or knows what's going on, I am still happy to listen :) Cheers, Joern Am 14.08.2026 um 14:35 schrieb Clausen, Jörn via MediaWiki-l: > Hello! > > I am currently evaluating Anubis (https://anubis.techaro.lol/) to > protect my Wikis from (AI) crawlers. > > Initial tests were successful and everything looked fine and as it > should - using Firefox. Then I tried Chrome and I am blocked from > accessing the wikis immediately. > > I am not sure if Anubis blocks the access, or Chrome triggers some > problem with the way Anubis wedges itself between the user and the > wiki in Apache. > > I guess running MediaWiki behind Anubis is not that uncommon. Is this > a problem others have seen and solved? Any help would be appreciated. > > Cheers, > Joern > -- Jörn Clausen Plattformen & Serverdienste BITS - Bielefelder IT-Servicezentrum https://www.uni-bielefeld.de/bits _______________________________________________ MediaWiki-l mailing list -- [email protected] To unsubscribe send an email to [email protected] https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/ _______________________________________________ MediaWiki-l mailing list -- [email protected] To unsubscribe send an email to [email protected] https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/