mirror of
https://github.com/nextcloud/server.git
synced 2026-11-20 11:30:26 +01:00
When two concurrent requests of the same session (e.g. with Apache/SSO based login) try to create the session token, one of them fails with a unique constraint violation. The recovery path then looked up the existing token, but it ran inside the transaction opened by createSessionToken(). On PostgreSQL the failed INSERT aborts the whole transaction, so the lookup failed with "SQLSTATE[25P02]: current transaction is aborted" and the request errored out. Move the conflict handling from Token\Manager to Session so that it runs after the transaction was rolled back. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Carl Schwan <carl@carlschwan.eu> Signed-off-by: Louis Chmn <louis@chmn.me>