You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2018/07/28 20:01:45 UTC

[whimsy] branch master updated: Only match whole names

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new ae2f782  Only match whole names
ae2f782 is described below

commit ae2f78275fcab45602f3fc231a5911a256d0bdc2
Author: Sebb <se...@apache.org>
AuthorDate: Sat Jul 28 21:01:43 2018 +0100

    Only match whole names
---
 www/secretary/ldap-names.cgi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/secretary/ldap-names.cgi b/www/secretary/ldap-names.cgi
index cd45ce2..b4add9d 100755
--- a/www/secretary/ldap-names.cgi
+++ b/www/secretary/ldap-names.cgi
@@ -60,10 +60,10 @@ _html do
       next if p.banned?
       given = p.givenName rescue '---' # some entries have not set this up
 
-      givenOK = p.cn.include? given
+      givenOK = p.cn.split.include? given
       badGiven += 1 unless givenOK
 
-      snOK = p.cn.include? p.sn
+      snOK = p.cn.split.include? p.sn
       badSN += 1 unless snOK
 
       if givenOK and snOK # all checks OK