#5140: Wiki editing via API failing when captcha has to be solved
-------------------------+------------------------
Reporter: adamwill | Owner: webmaster
Type: bug | Status: new
Priority: major | Milestone: asap
Component: Web Content | Version:
Severity: High | Resolution:
Keywords: | Blocked By:
Blocking: | Sensitive: 0
-------------------------+------------------------
Comment (by adamwill):
here's a simple test script:
{{{
#!/usr/bin/python
import logging
import wikitcms.wiki
import wikitcms.page
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG)
site = wikitcms.wiki.Wiki(('https', 'stg.fedoraproject.org'),
'/w/')
site.force_login = False
page = wikitcms.page.Page(site, 'Test Results:Foo')
page.save('https://www.foo.com')
}}}
That should work, instead it doesn't. wikitcms tries to save the page,
gets an mwclient EditError with the captcha, solves it, sends another save
request with the captchaid and captchaword, and mwclient raises another
EditError with another captcha to solve. I do not know why.
If you run the test script with latest git master wikitcms you get some
debug output showing that wikitcms hits its captcha solving code, finds
the captcha, solves it, and sends the second request to mwclient.
--
Ticket URL: <
https://fedorahosted.org/fedora-infrastructure/ticket/5140#comment:1>
Fedora Infrastructure <
http://fedoraproject.org/wiki/Infrastructure>
Fedora Infrastructure Project for Bugs, feature requests and access to our source code.