Browse Source

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.
Endi S. Dewata 15 years ago
parent
commit
be17b937b0
2 changed files with 2 additions and 2 deletions
  1. 1 1
      ldap/admin/src/scripts/DSCreate.pm.in
  2. 1 1
      ldap/admin/src/scripts/DSUtil.pm.in

+ 1 - 1
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");

+ 1 - 1
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
     }