Page MenuHomePhabricator

automatic login to private wiki raises APIError on the second failed login
Closed, InvalidPublic


If an automatic login to a private (read denied) is attempted twice, the first action will raise NoUsername, but the second login will raise APIError.

Event Timeline

jayvdb raised the priority of this task from to High.
jayvdb updated the task description. (Show Details)
jayvdb added subscribers: Unknown Object (MLST), jayvdb, Aklapper.

I'm currently guessing but it does sort of make sense. The second APIError happens probably because after the first failed login the API knows that login doesn't work and doesn't attempt to login but just reraises the possible APIError caught in the first attempt.

Ah the site's _loginstatus is -2 (IN_PROGRESS). Seems like the status is not properly changed.

Change 215000 had a related patch set uploaded (by XZise):
[FIX] APISite: Reset loginstatus

Change 143038 had a related patch set uploaded (by John Vandenberg):
site._loginstatus - login process and caching

Xqt removed XZise as the assignee of this task.Mar 31 2020, 3:47 PM
Huji subscribed.

Judging by the associated patch, this was related to the "sysopnames" feature of bot logins, which we have since deprecated and removed (see T71283). I am going to mark it as Invalid given how much the code has moved forward since this task was created. Can always be reopened if the issue still matters.

I can see only a little sysopnames connection here or in the patch. The whole point is resetting the login status on failure, which is a clever idea. But anyway issues like these are still present, but the output changed since then drastically so it would be hard to recognize the newly occuring issue is a dupe of this one.

Change 143038 abandoned by Xqt:
site._loginstatus - login process and caching

very outdated

Change 215000 abandoned by Xqt:
[FIX] APISite: Reset loginstatus

already solved