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

LDAP: better check for emptiness, fixes #3815 #3816

Merged
merged 3 commits into from
Jun 22, 2013
Merged

LDAP: better check for emptiness, fixes #3815 #3816

merged 3 commits into from
Jun 22, 2013

Conversation

blizzz
Copy link
Contributor

@blizzz blizzz commented Jun 21, 2013

preg_split returns an array with one (empty) element, if an empty string (or null) is passed.

Reviewers please @FlorinPeter @DeepDiver1975 @bartv2 or others

@karlitschek
Copy link
Contributor

👍

@DeepDiver1975
Copy link
Member

@blizzz what about fixing this within readConfiguration() and only write the proper value into $this->config?

@VicDeo
Copy link
Member

VicDeo commented Jun 21, 2013

@blizzz May be fix readConfiguration instead?
I see one more emptiness check

&& (empty($this->config['ldapBaseUsers'])

@blizzz
Copy link
Contributor Author

blizzz commented Jun 21, 2013

@DeepDiver1975 considered it too, but reading is reading and validating is validating. Won't look too nice either way.

@VicDeo true, but it can only happen, if the Base DN is array([0] => ''), the user and group bases would have been adjusted. Will fix it. Good catch!

@blizzz
Copy link
Contributor Author

blizzz commented Jun 21, 2013

have a better idea for doing it in readConfiguration indeed

@blizzz
Copy link
Contributor Author

blizzz commented Jun 21, 2013

@DeepDiver1975 @VicDeo what do you think? Lovely?

@DeepDiver1975
Copy link
Member

👍

@VicDeo
Copy link
Member

VicDeo commented Jun 21, 2013

👍 as soon as test build is complete

blizzz added a commit that referenced this pull request Jun 22, 2013
LDAP: better check for emptiness, fixes #3815
@blizzz blizzz merged commit 38d702e into stable5 Jun 22, 2013
@blizzz blizzz deleted the fix_3815 branch June 22, 2013 07:11
@blizzz
Copy link
Contributor Author

blizzz commented Jul 10, 2013

Port to master: 5387e5c

@lock lock bot locked as resolved and limited conversation to collaborators Aug 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants