From 6aa0526082ce4f48d8d30eb2bf66c6acff2a3ec3 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 22 Nov 2017 07:09:30 -0800 Subject: [PATCH] Fix validation for bases with spaces in them https://sourceforge.net/p/webadmin/bugs/5044/ --- ldap-client/check.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ldap-client/check.cgi b/ldap-client/check.cgi index 66fcfbd2c..936f7746f 100755 --- a/ldap-client/check.cgi +++ b/ldap-client/check.cgi @@ -21,10 +21,10 @@ if (&get_ldap_client() eq "nss") { else { # Newer LDAP versions have a base starting with 'user', but fall back # to the one with no DB - ($user_base) = map { /^\S+\s+(\S+)/; $1 } + ($user_base) = map { /^\S+\s+(\S+=*)/; $1 } grep { /^passwd\s/ } @bases; if (!$user_base) { - ($user_base) = grep { /^\S+$/ } @bases; + ($user_base) = grep { /^\S+=.*$/ } @bases; } } if (!$user_base) {