Skip to content

Commit

Permalink
bug #35774 [Ldap] force default network timeout (nicolas-grekas)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.4 branch.

Discussion
----------

[Ldap] force default network timeout

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

The default network timeout is infinite, which makes no sense and can block workers.

Note that LDAP supports also "timelimit" options, but those are max-durations for LDAP queries. We cannot limit them by default.

Commits
-------

63f9e01 [Ldap] force default network timeout
  • Loading branch information
nicolas-grekas committed Feb 19, 2020
2 parents 7225a01 + 63f9e01 commit a81cbc9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Symfony/Component/Ldap/Adapter/ExtLdap/Connection.php
Expand Up @@ -107,6 +107,10 @@ protected function configureOptions(OptionsResolver $resolver)
$value['referrals'] = $options['referrals'];
}

if (!isset($value['network_timeout'])) {
$value['network_timeout'] = ini_get('default_socket_timeout');
}

return $value;
});

Expand Down

0 comments on commit a81cbc9

Please sign in to comment.