Repository navigation
Conversation
Owner
|
This would be a nice improvement but it's slightly more complicated. E.g. password_required() or drivers (igdb.php) write to a session here. |
landsman
force-pushed
the
login-session-lock
branch
from
October 29, 2026 18:10
0d08f15 to
33e865a
Compare
Contributor
Author
|
Right, thanks. Now the session is closed only for I checked every session write. Of the drivers' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The session stays locked while
Driver::connect()runs, so a login to a server that accepts the connection but never answers blocks every other page of the session until the connect gives up. Queries already release the lock bystop_session(); this moves that call before the connect. The two writes after it, the CSRF token and the token for the next attempt inauth_error(), reopen the session byrestart_session()first, asauth_error()already does beforeadd_invalid_login().To reproduce, it needs a server running more than one request at a time; plain
php -Sserializes the requests anyway:Log in to PostgreSQL at
127.0.0.1:5433, and while it waits, open Adminer in another tab. That tab took 29 s before and 0.003 s after (PHP 8.4).A plugin writing to
$_SESSIONinlogin()withoutrestart_session()would lose the write now;login-otpalready calls it.