From 12442f32705b13bfbb551c1a010002578d4f3ff8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Thu, 23 Jun 2016 14:47:20 +0200 Subject: [PATCH] Close session fast when doing a test to prevent blocking the next requests --- apps/user_ldap/ajax/testConfiguration.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/user_ldap/ajax/testConfiguration.php b/apps/user_ldap/ajax/testConfiguration.php index 6581e8453bd..f73e11d3e21 100644 --- a/apps/user_ldap/ajax/testConfiguration.php +++ b/apps/user_ldap/ajax/testConfiguration.php @@ -39,6 +39,13 @@ $_POST['ldap_configuration_active'] = 1; try { if ($connection->setConfiguration($_POST)) { + /* + * Clossing the session since it won't be used from this point on. There might be a potential + * race condition if a second request is made: either this request or the other might not + * contact the LDAP backup server the first time when it should, but there shouldn't be any + * problem with that other than the extra connection. + */ + \OC::$server->getSession()->close(); //Configuration is okay if ($connection->bind()) { /* -- 2.39.5