server/tests/lib/Authentication
Christoph Wurst 0299ea0a96
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-11-26 12:07:12 +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 Some php-cs fixes 2019-11-22 20:52:10 +01:00
LoginCredentials Fix risky tests without assertions 2018-01-25 11:33:25 +01:00
Token Handle token insert conflicts 2019-11-26 12:07:12 +01:00
TwoFactorAuth Use Symfony's new contract Event class instead of the deprecated one 2019-09-12 14:44:55 +02:00