diff options
author | Juan Pablo Villafáñez <jvillafanez@solidgear.es> | 2016-06-23 14:47:20 +0200 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2016-07-27 11:41:34 +0200 |
commit | 12442f32705b13bfbb551c1a010002578d4f3ff8 (patch) | |
tree | c325d48f392208e229eadb50fd5aac48eb0b5db6 /apps/user_ldap/ajax | |
parent | 318d68a9a95cc710aa30c24a84d78da280327aef (diff) | |
download | nextcloud-server-12442f32705b13bfbb551c1a010002578d4f3ff8.tar.gz nextcloud-server-12442f32705b13bfbb551c1a010002578d4f3ff8.zip |
Close session fast when doing a test to prevent blocking the next
requests
Diffstat (limited to 'apps/user_ldap/ajax')
-rw-r--r-- | apps/user_ldap/ajax/testConfiguration.php | 7 |
1 files changed, 7 insertions, 0 deletions
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()) { /* |