mirror of
https://github.com/vrana/adminer.git
synced 2026-07-20 00:40:00 +02:00
Use namespace in login form
This commit is contained in:
@@ -37,13 +37,13 @@ class AdminerLoginServers {
|
||||
function loginForm() {
|
||||
?>
|
||||
<table cellspacing="0">
|
||||
<tr><th><?php echo lang('Server'); ?><td><input type="hidden" name="driver" value="<?php echo $this->driver; ?>"><select name="server"><?php echo optionlist($this->servers, SERVER); ?></select>
|
||||
<tr><th><?php echo lang('Username'); ?><td><input id="username" name="username" value="<?php echo h($_GET["username"]); ?>">
|
||||
<tr><th><?php echo lang('Password'); ?><td><input type="password" name="password">
|
||||
<tr><th><?php echo lang('Server'); ?><td><input type="hidden" name="auth[driver]" value="<?php echo $this->driver; ?>"><select name="auth[server]"><?php echo optionlist($this->servers, SERVER); ?></select>
|
||||
<tr><th><?php echo lang('Username'); ?><td><input id="username" name="auth[username]" value="<?php echo h($_GET["username"]); ?>">
|
||||
<tr><th><?php echo lang('Password'); ?><td><input type="password" name="auth[password]">
|
||||
</table>
|
||||
<p><input type="submit" value="<?php echo lang('Login'); ?>">
|
||||
<?php
|
||||
echo checkbox("permanent", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n";
|
||||
echo checkbox("auth[permanent]", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ class AdminerPasswordSha1 {
|
||||
$this->login = $login;
|
||||
$this->passwordSha1 = $passwordSha1;
|
||||
$this->credentials = $credentials;
|
||||
if (isset($_POST["password"])) {
|
||||
$_POST["password"] = sha1($_POST["password"]);
|
||||
if (isset($_POST["auth"])) {
|
||||
$_POST["auth"]["password"] = sha1($_POST["auth"]["password"]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class AdminerPasswordSha1 {
|
||||
}
|
||||
|
||||
function permanentLogin() {
|
||||
//! should save original $_POST["password"] and hash after load
|
||||
//! should save original $_POST["auth"]["password"] and hash after load
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user