Page MenuHomeMiraheze

Migration to CloudFlare breaks wikiteam3
Closed, DeclinedPublic

Description

wikiteam3 is a tool that generates XML and images backups that does not require server access. I personally use it erratically to create image backups of a wiki I maintain (I am aware of Datadump, but it understandly doesn't do images).

I believe CloudFlare is currently deployed for *.miraheze.org, but not custom domains, per T12057#243949 and:

> dig meta.miraheze.org NS +noall +answer +authority
miraheze.org.           1       IN      SOA     angela.ns.cloudflare.com. dns.cloudflare.com. 2342883658 10000 2400 604800 1800
> dig rainverse.miraheze.org NS +noall +answer +authority
miraheze.org.           1       IN      SOA     angela.ns.cloudflare.com. dns.cloudflare.com. 2342883658 10000 2400 604800 1800
> dig rainverse.wiki NS +noall +answer +authority
rainverse.wiki.         300     IN      NS      ns1.wikitide.net.
rainverse.wiki.         300     IN      NS      ns2.wikitide.net.
> dig pandorastale.miraheze.org NS +noall +answer +authority
miraheze.org.           1       IN      SOA     angela.ns.cloudflare.com. dns.cloudflare.com. 2342883658 10000 2400 604800 1800
> dig pandorastale.wiki NS +noall +answer +authority
pandorastale.wiki.      300     IN      NS      ns2.wikitide.net.
pandorastale.wiki.      300     IN      NS      ns1.wikitide.net.

On non-CloudFlare domains, wikiteam3 works just fine:

> wikiteam3dumpgenerator https://rainverse.wiki --get-wiki-engine
MediaWiki
Undo monkey patch...
> wikiteam3dumpgenerator https://rainverse.wiki --images
Checking API... https://rainverse.wiki/w/api.php
API is OK:  https://rainverse.wiki/w/api.php
Checking index.php... https://rainverse.wiki/w/Rainverse_Wiki
check_index(): Trying Special:Random...
POST https://rainverse.wiki/w/Rainverse_Wiki {'title': 'Special:Random'} 302
GET https://rainverse.wiki/wiki/Rain:419:_Maternity {'title': 'Special:Random'} 200
index.php available probability: 90% (0.9)
index.php is OK
No --path argument provided. Defaulting to:
  [working_directory]/[domain_prefix]-[date]-wikidump
Which expands to:
  ./rainverse.wiki_w-20240609-wikidump
--delay is the default value of 1.5
There will be a 1.5 second delay between HTTP calls in order to keep the server from timing you out.
If you know that this is unnecessary, you can manually specify '--delay 0.0'.
Undo monkey patch...
#########################################################################
# Welcome to DumpGenerator 4.2.6 by WikiTeam3 (GPL v3)                  #
# More info at: <https://github.com/saveweb/wikiteam3>                  #
# Copyright (C) 2011-2024 WikiTeam developers                           #
#########################################################################

Analysing https://rainverse.wiki/w/api.php
Found an existing dump at Internet Archive
{'identifier': 'wiki-rainverse.wiki_w-20240510', 'addeddate': '2024-05-10T21:26:43Z', 'subject': ['wiki', 'wikiteam', 'wikiteam3', 'MediaWiki', 'rainverse.wiki_w', 'Rainverse Wiki'], 'originalurl': 'https://rainverse.wiki/w/api.php', 'title': 'Wiki - Rainverse Wiki', 'item_size': 169584790}
https://archive.org/details/wiki-rainverse.wiki_w-20240510
A dump of this wiki was uploaded to IA in the last 365 days. Aborting.

However, it breaks on CloudFlare'd domains:

> wikiteam3dumpgenerator https://rainverse.miraheze.org --get-wiki-engine
403 Forbidden, trying GET instead of POST: https://rainverse.miraheze.org
Unknown
Undo monkey patch...
> wikiteam3dumpgenerator https://rainverse.miraheze.org --images
403 Forbidden, trying GET instead of POST: https://rainverse.miraheze.org
ERROR: Unsupported wiki. Wiki engines supported are: MediaWiki
Undo monkey patch...

MITM-ing the traffic that wikiteam3dumpgenerator sends, I see that I get a 403 with a "Just a moment..." message, the CloudFlare captcha check.

Related Objects