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 2021/06/21 22:37:56 UTC

[whimsy] branch master updated: Allow for commas

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 900735c  Allow for commas
900735c is described below

commit 900735cac8ba99083538601558534cc7387fac8e
Author: Sebb <se...@apache.org>
AuthorDate: Mon Jun 21 23:37:49 2021 +0100

    Allow for commas
---
 www/members/ldap-namecheck.cgi | 2 +-
 www/secretary/ldap-names.cgi   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/members/ldap-namecheck.cgi b/www/members/ldap-namecheck.cgi
index e23d845..c201606 100755
--- a/www/members/ldap-namecheck.cgi
+++ b/www/members/ldap-namecheck.cgi
@@ -88,7 +88,7 @@ _html do
       next unless public_name # Don't check entries not in iclas.txt
 
       cnOK = (public_name == p.cn)
-      pnames=public_name.split
+      pnames=public_name.gsub(',', '').split
       missingGiven = given.split.any? {|one| ! (one == p.uid or pnames.include?(one) or pnames.any? {|pn| ASF::Person.names_equivalent?(pn, one)})}
       missingsn = p.sn.split.any? {|one| ! (one == p.uid or pnames.include? one or pnames.any? {|pn| ASF::Person.names_equivalent?(pn, one)})}
       if givenOK and snOK and cnOK and ! missingGiven and ! missingsn # all checks OK
diff --git a/www/secretary/ldap-names.cgi b/www/secretary/ldap-names.cgi
index 0ad1351..84abfe8 100755
--- a/www/secretary/ldap-names.cgi
+++ b/www/secretary/ldap-names.cgi
@@ -141,7 +141,7 @@ _html do
       next unless public_name # Don't check entries not in iclas.txt
 
       cnOK = (public_name == p.cn)
-      pnames=public_name.split
+      pnames=public_name.gsub(',', '').split
       missingGiven = given.split.any? {|one| ! (one == p.uid or pnames.include?(one) or pnames.any? {|pn| ASF::Person.names_equivalent?(pn, one)})}
       missingsn = p.sn.split.any? {|one| ! (one == p.uid or pnames.include? one or pnames.any? {|pn| ASF::Person.names_equivalent?(pn, one)})}
       if givenOK and snOK and cnOK and ! missingGiven and ! missingsn # all checks OK