From f6b1907b1d91a01acefd60d81ed66e89746ca82a Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 8 Nov 2006 05:15:31 +0000 Subject: [PATCH] r1276: Change the name of the email and password fields so evil autofill doesn't do stupid things, like autocompleting those fields --- docs/changes.txt | 1 + templates/userctrl.tpl | 4 ++-- userctrl.php | 20 ++++++++++---------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index a00816b..ae2f251 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -9,6 +9,7 @@ - Fixed a SQL error that would occur when editing a report with no emails linked to it (http://www.bluestatic.org/bugs/showreport.php?bugid=46) - Added the ability to delete attachments from the database (http://www.bluestatic.org/bugs/showreport.php?bugid=47) - Fixed a scrollpane bug in IE7 (http://www.bluestatic.org/bugs/showreport.php?bugid=48) +- In the "My Controls" tab, change the name of the email and password fields to prevent autocomplete from working on them 1.1.3 =============================== diff --git a/templates/userctrl.tpl b/templates/userctrl.tpl index 95ee97d..d8ace7d 100644 --- a/templates/userctrl.tpl +++ b/templates/userctrl.tpl @@ -80,7 +80,7 @@ $header
{@"Password"} - +
@@ -92,7 +92,7 @@ $header
{@"Email"} - +
diff --git a/userctrl.php b/userctrl.php index 7cf127c..caece8b 100644 --- a/userctrl.php +++ b/userctrl.php @@ -57,7 +57,7 @@ if ($_POST['do'] == 'update') { // ------------------------------------------------------------------- // authentication - if (!empty($bugsys->in['password']) OR !empty($bugsys->in['email'])) + if (!empty($bugsys->in['password_change']) OR !empty($bugsys->in['email_change'])) { if (empty($bugsys->in['validate'])) { @@ -74,38 +74,38 @@ if ($_POST['do'] == 'update') // ------------------------------------------------------------------- // email validation - if (!empty($bugsys->in['email'])) + if (!empty($bugsys->in['email_change'])) { - if (!empty($bugsys->in['email']) AND empty($bugsys->in['email_confirm'])) + if (!empty($bugsys->in['email_change']) AND empty($bugsys->in['email_confirm'])) { $message->add_error(_('You need to enter both the email and confirm email fields to change your address')); } - if ($bugsys->in['email'] != $bugsys->in['email_confirm']) + if ($bugsys->in['email_change'] != $bugsys->in['email_confirm']) { $message->add_error(_('Your email and confirm email addresses do not match')); } - $userapi->set('email', $bugsys->in['email']); + $userapi->set('email', $bugsys->in['email_change']); } // ------------------------------------------------------------------- // password validation - if (!empty($bugsys->in['password'])) + if (!empty($bugsys->in['password_change'])) { - if (!empty($bugsys->in['password']) AND empty($bugsys->in['password_confirm'])) + if (!empty($bugsys->in['password_change']) AND empty($bugsys->in['password_confirm'])) { $message->add_error(_('You need to enter both the password and confirm password fields to change your password')); } else { - if ($bugsys->in['password'] != $bugsys->in['password_confirm']) + if ($bugsys->in['password_change'] != $bugsys->in['password_confirm']) { $message->add_error(_('Your password and confirm password do not match')); } } - $userapi->set('password', $bugsys->in['password']); + $userapi->set('password', $bugsys->in['password_change']); } $userapi->set('displayname', $bugsys->in['displayname']); @@ -130,7 +130,7 @@ if ($_POST['do'] == 'update') $userinfo['defaultsorkey'] = $bugsys->in['defaultsorkey']; $userinfo['defaultsortas'] = $bugsys->in['defaultsortas']; - $email = $bugsys->in['email']; + $email = $bugsys->in['email_change']; $email_confirm = $bugsys->in['email_confirm']; // ------------------------------------------------------------------- -- 2.43.5