Patches item #2055939, was opened at 2008-08-17 16:07
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=205593…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Marcin Cieslak (saperski)
Assigned to: Nobody/Anonymous (nobody)
Summary: spamprotectiontitle eq antispam label => SpamfilterError
Initial Comment:
On Polish Wikipedia, spamprotectiontitle contains "Filtr antyspamowy". This, in
turn, is the same wording as used in the "wpAntispam" label.
Whenever you try to re-create a deleted page, a confirmation page contains:
<div id=
antispam-containter" style="display: none;">
<label for="wpAntispam">Filtr antyspamowy.
<b>NIE</b> wpisuj tu nic!</label> <input type="text"
name="wpAntispam" id="wpAntispam" value="" />
</div>
The word "Filtr antyspamowy" matches the value of
"MediaWiki:Spamprotectiontitle" and triggers the SpamfilterError case in the
wikipedia._putPage.
This function checks for wpRecreate later and this code is not reached.
The attached patch puts the "wpRecreate" check first.
How to reproduce:
Create a page with a bot:
import wikipedia
site = wikipedia.getSite('pl','wikipedia')
p = wikipedia.Page(site, u"User:Miner/Test123")
p.put(open("/etc/motd").read())
As sysop delete the page. Re-run script and you get:
File "antispam.py", line 6, in <module>
p.put(open("/etc/motd").read())
File "wikipedia.py", line 1284, in put
newPage, self.site().getToken(sysop = sysop), sysop = sysop)
File "wikipedia.py", line 1421, in _putPage
raise SpamfilterError(url)
wikitest.SpamfilterError:
http://pl.wikipedia.org
which is plain nonsense.
--Marcin
----------------------------------------------------------------------
Comment By: NicDumZ Nicolas Dumazet (nicdumz)
Date: 2008-08-17 16:43
Message:
Logged In: YES
user_id=1963242
Originator: NO
Thanks for that very accurate bug report ;)
Fixed in r5803 !
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=205593…