server/lib/private
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
..
Accounts Some php-cs fixes 2019-11-22 20:52:10 +01:00
Activity Some php-cs fixes 2019-11-22 20:52:10 +01:00
App Some php-cs fixes 2019-11-22 20:52:10 +01:00
AppFramework Some php-cs fixes 2019-11-22 20:52:10 +01:00
Archive Cleanup some PHPDoc leftovers and unused variables 2019-03-06 15:43:56 +01:00
Authentication Handle token insert conflicts 2019-11-26 12:07:12 +01:00
Avatar Some php-cs fixes 2019-11-22 20:52:10 +01:00
BackgroundJob Some php-cs fixes 2019-11-22 20:52:10 +01:00
Broadcast/Events Make it possible to broadcast events to (web) clients 2019-10-28 13:58:13 +01:00
Cache remove unneeded is_dir from file cache gc 2018-05-24 14:24:10 +02:00
Calendar RoomManager/ResourceManager: Inject IServerContainer instead of using OC Server 2018-10-08 01:50:17 +02:00
Collaboration Some php-cs fixes 2019-11-22 20:52:10 +01:00
Command Use ::class statement instead of string 2018-01-29 12:03:47 +01:00
Comments Some php-cs fixes 2019-11-22 20:52:10 +01:00
Console Some php-cs fixes 2019-11-22 20:52:10 +01:00
Contacts/ContactsMenu Some php-cs fixes 2019-11-22 20:52:10 +01:00
Dashboard Some php-cs fixes 2019-11-22 20:52:10 +01:00
DB Some php-cs fixes 2019-11-22 20:52:10 +01:00
Diagnostics
Encryption Some php-cs fixes 2019-11-22 20:52:10 +01:00
EventDispatcher Some php-cs fixes 2019-11-22 20:52:10 +01:00
Federation Some php-cs fixes 2019-11-22 20:52:10 +01:00
Files Merge pull request #18079 from nextcloud/fixes/phpcs 2019-11-25 14:07:00 +01:00
FullTextSearch Some php-cs fixes 2019-11-22 20:52:10 +01:00
GlobalScale Some php-cs fixes 2019-11-22 20:52:10 +01:00
Group Merge pull request #17896 from nextcloud/fix/noid/consider-create-group-result 2019-11-25 17:16:40 +01:00
Hooks
Http Set a default request timeout 2019-09-02 15:42:48 +02:00
IntegrityCheck Exclude .rnd files from integrity check 2019-07-21 20:29:11 +02:00
L10N Some php-cs fixes 2019-11-22 20:52:10 +01:00
legacy Some php-cs fixes 2019-11-22 20:52:10 +01:00
Lock Some php-cs fixes 2019-11-22 20:52:10 +01:00
Lockdown Remove deprecated searchByTag 2019-07-26 12:29:19 +02:00
Log Some php-cs fixes 2019-11-22 20:52:10 +01:00
Mail Some php-cs fixes 2019-11-22 20:52:10 +01:00
Memcache Some php-cs fixes 2019-11-22 20:52:10 +01:00
Migration Some php-cs fixes 2019-11-22 20:52:10 +01:00
Notification Update since to the correct version 2019-07-16 16:58:38 +02:00
OCS Some php-cs fixes 2019-11-22 20:52:10 +01:00
Preview Some php-cs fixes 2019-11-22 20:52:10 +01:00
Remote
Repair Some php-cs fixes 2019-11-22 20:52:10 +01:00
RichObjectStrings Validate all rich objects not only the used ones 2018-11-23 12:39:02 +01:00
Route Some php-cs fixes 2019-11-22 20:52:10 +01:00
Search
Security Some php-cs fixes 2019-11-22 20:52:10 +01:00
Session replace setcookie value with '' instead of null. 2018-09-06 20:34:16 +02:00
Settings Some php-cs fixes 2019-11-22 20:52:10 +01:00
Setup Some php-cs fixes 2019-11-22 20:52:10 +01:00
Share Some php-cs fixes 2019-11-22 20:52:10 +01:00
Share20 Some php-cs fixes 2019-11-22 20:52:10 +01:00
Support Add extendedSupport to Subscription 2019-06-17 16:36:23 +02:00
SystemTag Some php-cs fixes 2019-11-22 20:52:10 +01:00
Tagging Some php-cs fixes 2019-11-22 20:52:10 +01:00
Template Some php-cs fixes 2019-11-22 20:52:10 +01:00
Updater Some php-cs fixes 2019-11-22 20:52:10 +01:00
User Some php-cs fixes 2019-11-22 20:52:10 +01:00
AllConfig.php Add methods to get casted system values 2019-02-22 08:25:41 +01:00
AppConfig.php Filter more configs 2019-08-19 16:32:20 +02:00
CapabilitiesManager.php Some php-cs fixes 2019-11-22 20:52:10 +01:00
Color.php Fix autoloader 2018-04-12 16:24:44 +02:00
Config.php Some php-cs fixes 2019-11-22 20:52:10 +01:00
ContactsManager.php Allow to search for real pattern in contacts 2019-05-28 10:01:56 +02:00
DatabaseException.php
DatabaseSetupException.php
DateTimeFormatter.php
DateTimeZone.php move log constants to ILogger 2018-04-26 10:45:52 +02:00
ForbiddenException.php
HintException.php
InitialStateService.php Add a key parameter to the new initial state API 2019-01-30 16:08:08 +01:00
Installer.php Run repair steps when enabling an app that has already been installed 2019-06-05 13:52:46 +02:00
LargeFileHelper.php Make LargeFileHelper.php faster by avoiding execs as much as possible 2018-05-17 14:28:32 +02:00
Log.php Some php-cs fixes 2019-11-22 20:52:10 +01:00
MemoryInfo.php Adds license to files. Updates the branch. 2018-08-20 20:46:23 +02:00
NaturalSort.php move log constants to ILogger 2018-04-26 10:45:52 +02:00
NaturalSort_DefaultCollator.php
NavigationManager.php Fix help route in navigation 2019-10-22 17:56:55 +02:00
NeedsUpdateException.php
NotSquareException.php
PreviewManager.php Some php-cs fixes 2019-11-22 20:52:10 +01:00
PreviewNotAvailableException.php
RedisFactory.php Allow redis cluster to use password 2019-05-22 12:19:07 +02:00
Repair.php Kill repair step for cypress tests 2019-09-02 11:50:23 +02:00
RepairException.php
Search.php Some php-cs fixes 2019-11-22 20:52:10 +01:00
Server.php Harden identifyproof openssl code 2019-09-14 13:52:10 +02:00
ServerContainer.php Make sure we create an app's Application class just once 2019-10-11 08:21:24 +02:00
ServerNotAvailableException.php
ServiceUnavailableException.php
Setup.php reformat Setup.php 2019-11-25 14:01:25 +01:00
Streamer.php Use zip32 only if there are less than 65536 files 2018-04-06 15:59:30 +02:00
SubAdmin.php Some php-cs fixes 2019-11-22 20:52:10 +01:00
SystemConfig.php Add information about credentials 2019-10-31 20:42:41 +01:00
TagManager.php
Tags.php Check if the favorite tag exists 2018-07-26 15:33:26 +02:00
TemplateLayout.php Some php-cs fixes 2019-11-22 20:52:10 +01:00
TempManager.php Some php-cs fixes 2019-11-22 20:52:10 +01:00
Updater.php Make the auto-disabled list more broad 2019-08-15 11:12:45 +02:00
URLGenerator.php Allow empty strings in getAbsoluteURL 2018-11-20 13:36:16 +01:00