nextcloud/tests/lib/Authentication
Christoph Wurst 55b5e13e15
Handle token insert conflicts
Env-based SAML uses the "Apache auth" mechanism to log users in. In this
code path, we first delete all existin auth tokens from the database,
before a new one is inserted. This is problematic for concurrent
requests as they might reach the same code at the same time, hence both
trying to insert a new row wit the same token (the session ID). This
also bubbles up and disables user_saml.

As the token might still be OK (both request will insert the same data),
we can actually just check if the UIDs of the conflict row is the same
as the one we want to insert right now. In that case let's just use the
existing entry and carry on.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-02 14:20:51 +01:00
..
Events Decouple remote wipe notifcation channels with events 2019-06-27 17:16:18 +02:00
Listeners Update unit tests 2019-07-16 13:32:44 +02:00
Login Use the actual password to update the tokens 2019-09-18 20:53:38 +00:00
LoginCredentials Fix risky tests without assertions 2018-01-25 11:33:25 +01:00
Token Handle token insert conflicts 2019-12-02 14:20:51 +01:00
TwoFactorAuth Allow 2FA to be setup on first login 2019-05-17 10:11:53 +02:00