From 71b17a1ff0d0cc4b29fa3c7f13db30a1e564e007 Mon Sep 17 00:00:00 2001 From: Gregory Soutade Date: Thu, 2 Jan 2014 09:56:17 +0100 Subject: [PATCH] index.php now includes ../../_user to simulate a symbolic link (for easier updates) Fix default parameters in gpass.js (not compatible with chrome and IE) --- server/ref/index.php | 40 +------------------------------------- server/ressources/gpass.js | 2 +- 2 files changed, 2 insertions(+), 40 deletions(-) diff --git a/server/ref/index.php b/server/ref/index.php index d750a21..3f09c8a 100755 --- a/server/ref/index.php +++ b/server/ref/index.php @@ -18,44 +18,6 @@ along with gPass. If not, see . */ -function load_database() -{ - try { - $db = new SQLite3("./gpass.bdd", SQLITE3_OPEN_READONLY); - } - catch(Exception $e) - { - die("Unable to load database for user $user !
"); - return null; - } - return $db; -} - -$PROTOCOL_VERSION = 2; - -$db = load_database(); - -$res = ""; - -$statement = $db->prepare("SELECT password FROM gpass WHERE login=:login"); - -echo "protocol=gpass-$PROTOCOL_VERSION\n"; - -for ($i=0; isset($_POST["k$i"]); $i++) -{ - $statement->bindValue(":login", $_POST["k$i"]); - $result = $statement->execute(); - $row = $result->fetchArray(SQLITE3_ASSOC); - $result->finalize(); - if (isset($row["password"])) - { - echo "pass=" . $row["password"] . "\n"; - break; - } -} - -$statement->close(); - -echo ""; +include "../../_user"; ?> \ No newline at end of file diff --git a/server/ressources/gpass.js b/server/ressources/gpass.js index c628e6c..94409a0 100755 --- a/server/ressources/gpass.js +++ b/server/ressources/gpass.js @@ -111,7 +111,7 @@ var passwords; var current_user = ""; var current_mkey = ""; -function PasswordEntry (ciphered_login="", ciphered_password="") { +function PasswordEntry (ciphered_login, ciphered_password) { this.ciphered_login = ciphered_login; this.ciphered_password = ciphered_password; this.unciphered = false;