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

Escape values provided by user #3

Open
1 of 7 tasks
foglcz opened this issue Mar 1, 2016 · 1 comment
Open
1 of 7 tasks

Escape values provided by user #3

foglcz opened this issue Mar 1, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@foglcz
Copy link
Owner

foglcz commented Mar 1, 2016

As in #2 , the values coming either from user and/or LDAP itself, can contain unescaped sequences.

Escape values properly, ie. using this -> http://php.net/manual/en/function.ldap-escape.php

For example, a comma is a wrong character, that when unescaped, throws an exception during search. Comma could be there, because you can have a group name:

HSBC (Pvt.) Ltd., Asia
(^ the character needing escaping is a comma, which will get escaped by LDAP. NEEDS TESTING!!)

Backend tests:

  • Groupname with a backslash
  • Groupname with a comma
  • Groupname with backslash, that is member of a group of the user
  • Groupname with comma, that is member of a group of the user

"Frontend" tests - supply values to authenticator:

  • Comma in a username
  • Dot in a username
  • Backslash in a username
@foglcz foglcz added the bug label Mar 1, 2016
@foglcz foglcz self-assigned this Mar 1, 2016
@foglcz foglcz added this to the 1.2.5 milestone Mar 1, 2016
@josefsabl
Copy link
Contributor

I just found out, that ldap_escape is in PHP 5.6 and up and simply using it would be bc break as ldap-authenticator supports php 5.3.2 and up.

Here http://stackoverflow.com/questions/8560874/php-ldap-add-function-to-escape-ldap-special-characters-in-dn-syntax is an example of how to escape the sequence manually.

@foglcz foglcz modified the milestones: 1.2.6, 1.2.5 Mar 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants