Page MenuHomePhabricator

How to invalidate BotPassword session?
Closed, ResolvedPublic

Description

After my bot has done its work, I would like to invalidate its session using action=logout yielding in

Cannot log out when using MediaWiki\Session\BotPasswordSessionProvider sessions

How to do it right?

This is about Bot Passwords introduced with f9fd9516d922d36291037baca7205a2b0ac9f15f

Related Objects

Event Timeline

Rillke added a subscriber: Anomie.

I don't think you can do that via the API. You can delete/reset passwords at Special:BotPasswords.

To clarify, I don't want to delete the password. I am logging in with the generated BotPassword and the BotUsername (useraccount@botname) -- this creates a session and after the bot having finished the work, I would like it to invalidate the session.

I note that BotPassword sessions don't use any persistent cookies, so you could just delete your cookies and you're good to go. But I'll make API action=logout do the right thing here too.

Change 273937 had a related patch set uploaded (by Anomie):
Allow API action=logout with BotPasswords

https://gerrit.wikimedia.org/r/273937

Change 273937 merged by jenkins-bot:
Allow API action=logout with BotPasswords

https://gerrit.wikimedia.org/r/273937

This should be deployed to WMF wikis with 1.27.0-wmf.15, see https://www.mediawiki.org/wiki/MediaWiki_1.27/Roadmap for the schedule.