[pmg-devel] [PATCH pmg-api v2 1/2] removed SMTP from regex

Markus Frank m.frank at proxmox.com
Wed Mar 30 14:32:14 CEST 2022


removed "SMTP" because of lowercase function is called before.

Signed-off-by: Markus Frank <m.frank at proxmox.com>
---
 src/PMG/LDAPCache.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PMG/LDAPCache.pm b/src/PMG/LDAPCache.pm
index df61454..19e22a4 100755
--- a/src/PMG/LDAPCache.pm
+++ b/src/PMG/LDAPCache.pm
@@ -160,11 +160,11 @@ sub queryusers {
 	    foreach my $mail (@{$user->{attributes}->{$attr}}) {
 		$mail = lc($mail);
 		# Test if the Line starts with one of the following lines:
-		# proxyAddresses: [smtp|SMTP]:
+		# proxyAddresses: [smtp]:
 		# and also discard this starting string, so that $mail is only the
 		# address without any other characters...
 
-		$mail =~ s/^(smtp|SMTP)[\:\$]//gs;
+		$mail =~ s/^smtp[\:\$]//gs;
 
 		if ($mail !~ m/[\{\}\\\/]/ && $mail =~ m/^\S+\@\S+$/) {
 		    $umails->{$mail} = 1;
-- 
2.30.2





More information about the pmg-devel mailing list