From 48aedc539d134c25f356305bca51696de826dd76 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 3 Mar 2010 20:38:16 +0000 Subject: [PATCH 1/1] fix date recognition regex for yyyymmdd --- bin/ldap-rewrite.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ldap-rewrite.pl b/bin/ldap-rewrite.pl index 490b444..f7be5e3 100755 --- a/bin/ldap-rewrite.pl +++ b/bin/ldap-rewrite.pl @@ -139,7 +139,7 @@ sub log_response { foreach my $attr ( @{ $response->{protocolOp}->{searchResEntry}->{attributes} } ) { if ( $attr->{type} =~ m/date/i ) { foreach my $i ( 0 .. $#{ $attr->{vals} } ) { - $attr->{vals}->[$i] = "$1-$2-$3" if $attr->{vals}->[$i] =~ m/^([12]\d\d\d)([01]\d+)([123]\d+)$/; + $attr->{vals}->[$i] = "$1-$2-$3" if $attr->{vals}->[$i] =~ m/^([12]\d\d\d)([01]\d+)([0123]\d+)$/; } } elsif ( $attr->{type} eq 'hrEduPersonUniqueNumber' ) { foreach my $val ( @{ $attr->{vals} } ) { -- 2.20.1