summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Core/Authentication/Provider/LdapBindAuthenticationProvider.php2
-rw-r--r--Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php3
-rw-r--r--Core/Tests/User/LdapUserProviderTest.php3
-rw-r--r--Core/User/LdapUserProvider.php2
4 files changed, 8 insertions, 2 deletions
diff --git a/Core/Authentication/Provider/LdapBindAuthenticationProvider.php b/Core/Authentication/Provider/LdapBindAuthenticationProvider.php
index fab7d80..adc42ef 100644
--- a/Core/Authentication/Provider/LdapBindAuthenticationProvider.php
+++ b/Core/Authentication/Provider/LdapBindAuthenticationProvider.php
@@ -74,7 +74,7 @@ class LdapBindAuthenticationProvider extends UserAuthenticationProvider
$password = $token->getCredentials();
try {
- $username = $this->ldap->escape($username, '', LdapClientInterface::LDAP_ESCAPE_DN);
+ $username = $this->ldap->escape($username, '', LDAP_ESCAPE_DN);
$dn = str_replace('{username}', $username, $this->dnString);
$this->ldap->bind($dn, $password);
diff --git a/Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php b/Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php
index f1b5c03..844bcef 100644
--- a/Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php
+++ b/Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php
@@ -16,6 +16,9 @@ use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Core\User\User;
use Symfony\Component\Ldap\Exception\ConnectionException;
+/**
+ * @requires extension ldap
+ */
class LdapBindAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
{
/**
diff --git a/Core/Tests/User/LdapUserProviderTest.php b/Core/Tests/User/LdapUserProviderTest.php
index f56648b..9b126e9 100644
--- a/Core/Tests/User/LdapUserProviderTest.php
+++ b/Core/Tests/User/LdapUserProviderTest.php
@@ -14,6 +14,9 @@ namespace Symfony\Component\Security\Core\Tests\User;
use Symfony\Component\Security\Core\User\LdapUserProvider;
use Symfony\Component\Ldap\Exception\ConnectionException;
+/**
+ * @requires extension ldap
+ */
class LdapUserProviderTest extends \PHPUnit_Framework_TestCase
{
/**
diff --git a/Core/User/LdapUserProvider.php b/Core/User/LdapUserProvider.php
index ec699fc..988a595 100644
--- a/Core/User/LdapUserProvider.php
+++ b/Core/User/LdapUserProvider.php
@@ -57,7 +57,7 @@ class LdapUserProvider implements UserProviderInterface
{
try {
$this->ldap->bind($this->searchDn, $this->searchPassword);
- $username = $this->ldap->escape($username, '', LdapClientInterface::LDAP_ESCAPE_FILTER);
+ $username = $this->ldap->escape($username, '', LDAP_ESCAPE_FILTER);
$query = str_replace('{username}', $username, $this->defaultSearch);
$search = $this->ldap->find($this->baseDn, $query);
} catch (ConnectionException $e) {