Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is parameter missing in security.user.provider.ldap ? #18933

Closed
idybil opened this issue Jun 1, 2016 · 3 comments
Closed

Is parameter missing in security.user.provider.ldap ? #18933

idybil opened this issue Jun 1, 2016 · 3 comments

Comments

@idybil
Copy link

idybil commented Jun 1, 2016

Hi, I think there is a missing parameter in the security.user.provider.ldap service in the security.xml file (vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml).

The missing parameter is the password_attribute.

<service id="security.user.provider.ldap" 
 class="Symfony\Component\Security\Core\User\LdapUserProvider" abstract="true" public="false">
 argument - security.ldap.ldap 
 argument  - base dn
 argument  - search dn
 argument  - search password
 argument  - default_roles
 argument  - uid key
 argument  - filter
 **argument  - SHOULD WE ADD A NEW ARGUMENT HERE FOR THE password_attribute ?**
</service>

Because when I try to use the LDAP provider in my security.yml file, Symfony throws me the next exception :

OutOfBoundsException in Definition.php line 202: The index "7" is not in the range [0, 6].

As a temporary workaround, I override the service in my service.yml to add the password_attribute parameter and it worked.

Thanks

EDIT: The Symfony version I'm using is 3.1

@linaori
Copy link
Contributor

linaori commented Jun 1, 2016

@csarrazi probably knows more about this, but my guess is that it slipped through as the functional tests are missing atm

@csarrazi
Copy link
Contributor

csarrazi commented Jun 1, 2016

@idybil Good catch! It seems that this is simply an issue with the service definition itself. I'll fix this ASAP.

@idybil
Copy link
Author

idybil commented Jun 1, 2016

Thanks @csarrazi

fabpot added a commit that referenced this issue Jun 1, 2016
…ow has the correct number of arguments (csarrazi)

This PR was merged into the 3.1 branch.

Discussion
----------

[Ldap][Security] The Ldap user provider abstract service now has the correct number of arguments

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18933
| License       | MIT
| Doc PR        | none

Commits
-------

58996ac Fixed issue with missing argument in the abstract service definition for the ldap user provider
@fabpot fabpot closed this as completed Jun 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants