Subject: | Error, NeedToken |
Date: | Sun, 02 Aug 2015 20:40:02 +0200 |
To: | bug-MediaWiki-API [...] rt.cpan.org |
From: | Richard Faasen <richie765 [...] gmail.com> |
I've upgraded MediaWiki to v1.25 and since then MediaWiki::API won't
login with the error "NeedToken". I think the problem only happens over
https.
Something strange is happening with the cookies, I don't know what
exactly, but the following hack seems to solve the problem, but it's
probably not such a good fix, so I just include it here to highlight
where the problem lies. Hopefully a real fix can be made.
Search for "cookie_jar", replace with:
use HTTP::Cookies;
my $cookie_jar = HTTP::Cookies->new(
file => "/tmp/lwp_cookies.dat",
autosave => 1,
ignore_discard => 1,
);
$ua->cookie_jar($cookie_jar);