]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 45918: the old password field on the userprefs page is now used to log...
authorjustdave%syndicomm.com <>
Wed, 20 Jun 2001 05:02:53 +0000 (05:02 +0000)
committerjustdave%syndicomm.com <>
Wed, 20 Jun 2001 05:02:53 +0000 (05:02 +0000)
r= tara@tequilarista.org

userprefs.cgi

index 5ad99cdbffa41ef9780cdc537fb4c6e9b257db22..f880cf8e228a397c7bf171456ed3fb0bd8e942be 100755 (executable)
@@ -130,9 +130,10 @@ sub ShowAccount {
     my ($realname) = (FetchSQLData());
 
     $realname = value_quote($realname);
-    
+        
     EmitEntry("Old password",
-              qq{<input type=password name="oldpwd">});
+              qq|<input type=hidden name="Bugzilla_login" value="$::COOKIE{Bugzilla_login}">| .
+              qq|<input type=password name="Bugzilla_password">|);
     EmitEntry("New password",
               qq{<input type=password name="pwd1">});
     EmitEntry("Re-enter new password", 
@@ -142,9 +143,9 @@ sub ShowAccount {
 }
 
 sub SaveAccount {
-    if ($::FORM{'oldpwd'} ne ""
+    if ($::FORM{'Bugzilla_password'} ne ""
         || $::FORM{'pwd1'} ne "" || $::FORM{'pwd2'} ne "") {
-        my $old = SqlQuote($::FORM{'oldpwd'});
+        my $old = SqlQuote($::FORM{'Bugzilla_password'});
         my $pwd1 = SqlQuote($::FORM{'pwd1'});
         my $pwd2 = SqlQuote($::FORM{'pwd2'});
         SendSQL("SELECT cryptpassword = ENCRYPT($old, LEFT(cryptpassword, 2)) " .