[389-commits] ldap/admin

Richard Allen Megginson rmeggins at fedoraproject.org
Thu Mar 11 17:10:16 UTC 2010


 ldap/admin/src/scripts/DSCreate.pm.in |    2 +-
 ldap/admin/src/scripts/DSUtil.pm.in   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit be17b937b06eeb0822189951a6f63cfb87749e32
Author: Endi S. Dewata <edewata at redhat.com>
Date:   Tue Mar 9 15:58:40 2010 -0600

    Bug 570542 - Root password cannot contain matching curly braces
    
    https://bugzilla.redhat.com/show_bug.cgi?id=570542
    Resolves: bug 570542
    Bug Description: Root password cannot contain matching curly braces
    Branch: HEAD
    Fix Description: The scripts have been modified to check for matching
    curly braces only at the beginning of the password. Matching curly
    braces anywhere else would be accepted as a valid password.

diff --git a/ldap/admin/src/scripts/DSCreate.pm.in b/ldap/admin/src/scripts/DSCreate.pm.in
index f8757ff..06b2d1f 100644
--- a/ldap/admin/src/scripts/DSCreate.pm.in
+++ b/ldap/admin/src/scripts/DSCreate.pm.in
@@ -124,7 +124,7 @@ sub sanityCheckParams {
         return ('dialog_dsrootdn_error', $inf->{slapd}->{RootDN});
     }
 
-    if ($inf->{slapd}->{RootDNPwd} =~ /\{\w+\}.+/) {
+    if ($inf->{slapd}->{RootDNPwd} =~ /^\{\w+\}.+/) {
         debug(1, "The root password is already hashed - no checking will be performed\n");
     } elsif (length($inf->{slapd}->{RootDNPwd}) < 8) {
         debug(0, "WARNING: The root password is less than 8 characters long.  You should choose a longer one.\n");
diff --git a/ldap/admin/src/scripts/DSUtil.pm.in b/ldap/admin/src/scripts/DSUtil.pm.in
index a8f3a30..c292d4e 100644
--- a/ldap/admin/src/scripts/DSUtil.pm.in
+++ b/ldap/admin/src/scripts/DSUtil.pm.in
@@ -728,7 +728,7 @@ sub getHashedPassword {
     my $pwd = shift;
     my $alg = shift;
 
-    if ($pwd =~ /\{\w+\}.+/) {
+    if ($pwd =~ /^\{\w+\}.+/) {
         return $pwd; # already hashed
     }
 




More information about the 389-commits mailing list