server/tests/lib
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
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
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
Cache
Calendar Some php-cs fixes 2019-11-22 20:52:10 +01:00
Collaboration/Collaborators Extend data returned when searching remote shares 2019-10-29 12:55:59 +01:00
Command Some php-cs fixes 2019-11-22 20:52:10 +01:00
Comments Add a unit test for guests as well 2019-07-11 10:24:27 +02:00
Contacts/ContactsMenu Do not try to autoload built in types 2019-06-04 15:13:32 +02: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
Federation
Files 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/Client Some php-cs fixes 2019-11-22 20:52:10 +01:00
IntegrityCheck Some php-cs fixes 2019-11-22 20:52:10 +01:00
L10N Move settings to an app 2019-09-28 09:39:28 +00:00
Lock Some php-cs fixes 2019-11-22 20:52:10 +01:00
Lockdown Some php-cs fixes 2019-11-22 20:52:10 +01:00
Log Log/FileTest does not require the DB 2019-09-04 20:41:12 +02:00
Mail
Memcache Some php-cs fixes 2019-11-22 20:52:10 +01:00
Migration Properly inject EventDispatched in BackgroundRepair 2019-03-22 10:29:36 +01:00
Notification Keep the old method as a fallback and adjust the tests 2019-07-16 11:36:32 +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
PublicNamespace
Remote
Repair Some php-cs fixes 2019-11-22 20:52:10 +01:00
RichObjectStrings
Security Some php-cs fixes 2019-11-22 20:52:10 +01:00
Session
Settings Some php-cs fixes 2019-11-22 20:52:10 +01:00
Share Remove unused OC\Share\Share::checkPasswordProtectedShare 2019-07-29 15:23:21 +02:00
Share20 Some php-cs fixes 2019-11-22 20:52:10 +01:00
Support Fix subscription tests 2019-06-17 16:36:24 +02:00
SystemTag 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
Traits Some php-cs fixes 2019-11-22 20:52:10 +01:00
Updater Do not check for updates if we have no internet 2019-11-20 19:30:59 +01:00
User Some php-cs fixes 2019-11-22 20:52:10 +01:00
Util Some php-cs fixes 2019-11-22 20:52:10 +01:00
AllConfigTest.php
APITest.php
AppConfigTest.php treat sensitive config keys by pattern 2019-07-26 13:31:14 +02:00
AppTest.php Some php-cs fixes 2019-11-22 20:52:10 +01:00
AutoLoaderTest.php
CapabilitiesManagerTest.php
ConfigTest.php
ContactsManagerTest.php
DateTimeFormatterTest.php
ErrorHandlerTest.php
FileChunkingTest.php Some php-cs fixes 2019-11-22 20:52:10 +01:00
HelperStorageTest.php Use dummy backend in test 2019-11-18 11:54:26 +01:00
HookHelper.php
ImageTest.php
InfoXmlTest.php Move settings to an app 2019-09-28 09:39:28 +00:00
InitialStateServiceTest.php
InstallerTest.php Update CRL to contain revoked files_external_dropbox, passman & payback 2019-02-14 11:49:35 +01:00
LargeFileHelperGetFileSizeTest.php
LargeFileHelperTest.php
LegacyHelperTest.php Remove the upload and memory setting 2019-03-04 12:14:22 +01:00
LoggerTest.php
MemoryInfoTest.php
NaturalSortTest.php
NavigationManagerTest.php Some php-cs fixes 2019-11-22 20:52:10 +01:00
RepairStepTest.php
ServerTest.php
SetupTest.php
SubAdminTest.php Some php-cs fixes 2019-11-22 20:52:10 +01:00
TagsTest.php Add dispatcher events to User and Group objects 2019-03-01 20:56:59 +01:00
TemplateFunctionsTest.php
TempManagerTest.php
TestCase.php
TestMoveableMountPoint.php
UpdaterTest.php Some php-cs fixes 2019-11-22 20:52:10 +01:00
UrlGeneratorTest.php
UtilCheckServerTest.php
UtilTest.php