Confirmation field for password
authorJamie Cameron <jcameron@webmin.com>
Wed, 7 Jul 2010 17:46:01 +0000 (10:46 -0700)
committerJamie Cameron <jcameron@webmin.com>
Wed, 7 Jul 2010 17:46:01 +0000 (10:46 -0700)
change-user/CHANGELOG
change-user/change.cgi
change-user/index.cgi
change-user/lang/en

index b734b27..194ed4a 100644 (file)
@@ -3,3 +3,5 @@ Converted the UI to use the new Webmin user interface functions, for a more cons
 ---- Changes since 1.440 ----
 If any theme overlays are installed, one can be selected in this module to modify the appearance of the underlying theme.
 Converted commands in the module's API file to POD format, and added more details about each function.
+---- Changes since 1.510 ----
+Added a password confirmation field for password changes.
index c2a062b..c1ea9d3 100755 (executable)
@@ -16,6 +16,8 @@ if (!defined($oldtheme)) {
 # Validate the password
 if ($access{'pass'} && &can_change_pass($user) && !$in{'pass_def'}) {
        $in{'pass'} =~ /:/ && &error($text{'change_ecolon'});
+       $in{'pass'} eq $in{'pass2'} ||
+               &error($text{'change_epass2'});
        $perr = &acl::check_password_restrictions(
                $user->{'name'}, $in{'pass'});
        &error(&text('change_epass', $perr)) if ($perr);
index b3339da..36e324b 100755 (executable)
@@ -73,7 +73,9 @@ if ($access{'pass'} && &can_change_pass($user)) {
                &ui_radio("pass_def", 1,
                          [ [ 1, $text{'index_passleave'}."<br>" ],
                            [ 0, $text{'index_passset'} ] ])." ".
-               &ui_password("pass", undef, 20));
+               &ui_password("pass", undef, 20)." ".
+               $text{'index_passagain'}." ".
+               &ui_password("pass2", undef, 20));
        }
 
 print &ui_table_end();
index 4995843..175be1b 100644 (file)
@@ -10,6 +10,7 @@ index_themeset=Personal choice ..
 index_pass=Webmin login password
 index_passleave=Leave unchanged
 index_passset=Set to ..
+index_passagain=Re-enter password
 index_ok=Make Changes
 index_themedef=Old Webmin Theme
 index_desc2=This module can be used to change $1, for your Webmin account only.
@@ -26,6 +27,7 @@ change_done=.. done
 change_restart=Reloading Webmin ..
 change_redirect=Re-directing to main menu ..
 change_ecolon=Your password cannot contain the : character
+change_epass2=New passwords do not match
 change_epass=New password is not valid : $1
 change_eoverlay=You cannot select a theme overlay unless a UI theme is also chosen
 change_eoverlay2=The selected theme overlay is not compatible with the chosen UI theme