diff options
author | Marc Delisle <marc@infomarc.info> | 2007-07-18 19:32:08 +0400 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2007-07-18 19:32:08 +0400 |
commit | 6147b3565e8a6adb345e2fb9e44bc99f61294947 (patch) | |
tree | 080c7ad3b71fa46f7b9f10066d12119688ac7b6c /user_password.php | |
parent | 05b3e94cff82b02cc4961529c5ae9df1f139deb0 (diff) |
Support password hashing on the Edit Privileges interface
Diffstat (limited to 'user_password.php')
-rw-r--r-- | user_password.php | 70 |
1 files changed, 2 insertions, 68 deletions
diff --git a/user_password.php b/user_password.php index ed625936ec..4091ffb157 100644 --- a/user_password.php +++ b/user_password.php @@ -30,6 +30,7 @@ if ($cfg['Server']['auth_type'] == 'config' || !$cfg['ShowChgPassword']) { * and submit the query or logout */ if (isset($nopass)) { + // similar logic in server_privileges.php $error_msg = ''; if ($nopass == 0 && isset($pma_pw) && isset($pma_pw2)) { @@ -96,75 +97,8 @@ if (!empty($error_msg)) { echo '<p><b>' . $strError . ': ' . $error_msg . '</b></p>' . "\n"; } -// loic1: autocomplete feature of IE kills the "onchange" event handler and it -// must be replaced by the "onpropertychange" one in this case -$chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5) - ? 'onpropertychange' - : 'onchange'; +require_once './libraries/display_change_password.lib.php'; -// Displays the form -?> -<form method="post" action="./user_password.php" name="chgPassword" onsubmit="return checkPassword(this)"> - <?php echo PMA_generate_common_hidden_inputs(); ?> - <table border="0"> - <tr> - <td colspan="2"> - <input type="radio" name="nopass" value="1" onclick="pma_pw.value = ''; pma_pw2.value = ''; this.checked = true" /> - <?php echo $GLOBALS['strNoPassword'] . "\n"; ?> - </td> - </tr> - <tr> - <td> - <input type="radio" name="nopass" value="0" checked="checked " /> - <?php echo $GLOBALS['strPassword']; ?>: - </td> - <td> - <input type="password" name="pma_pw" size="10" class="textfield" <?php echo $chg_evt_handler; ?>="nopass[1].checked = true" /> - - <?php echo $GLOBALS['strReType']; ?>: - <input type="password" name="pma_pw2" size="10" class="textfield" <?php echo $chg_evt_handler; ?>="nopass[1].checked = true" /> - </td> - </tr> - <?php - -if (PMA_MYSQL_INT_VERSION >= 40102) { - ?> - <tr> - <td> - <?php echo $strPasswordHashing; ?>: - </td> - <td> - <input type="radio" name="pw_hash" id="radio_pw_hash_new" value="new" checked="checked" /> - <label for="radio_pw_hash_new"> - MySQL 4.1 - </label> - </td> - </tr> - <tr> - <td> </td> - <td> - <input type="radio" name="pw_hash" id="radio_pw_hash_old" value="old" /> - <label for="radio_pw_hash_old"> - <?php echo $strCompatibleHashing; ?> - </label> - </td> - </tr> - <?php -} - - ?> - <tr> - <td colspan="2"> </td> - </tr> - <tr> - <td colspan="2"> - <input type="submit" value="<?php echo($strChange); ?>" /> - </td> - </tr> - </table> -</form> - -<?php /** * Displays the footer */ |