From: Jakub Vrana Date: Fri, 12 Aug 2011 11:44:25 +0000 (+0200) Subject: New plugin: Password SHA1 X-Git-Tag: v3.3.3~4 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=5d1a84d390ff521c15fd534ee3ec66fde0083e49;p=adminer.git New plugin: Password SHA1 --- diff --git a/plugins/password-sha1.php b/plugins/password-sha1.php new file mode 100644 index 00000000..c2e3eda7 --- /dev/null +++ b/plugins/password-sha1.php @@ -0,0 +1,38 @@ +login = $login; + $this->passwordSha1 = $passwordSha1; + $this->credentials = $credentials; + if (isset($_POST["password"])) { + $_POST["password"] = sha1($_POST["password"]); + } + } + + function login($login, $password) { + return ($login == $this->login && $password == $this->passwordSha1); + } + + function credentials() { + return $this->credentials; + } + + function permanentLogin() { + //! should save original $_POST["password"] and hash after load + } + +}