+
>
diff --git a/server/ref/index.php b/server/ref/index.php
index d0300d3..bf19044 100755
--- a/server/ref/index.php
+++ b/server/ref/index.php
@@ -31,12 +31,16 @@ function load_database()
return $db;
}
+$PROTOCOL_VERSION = 1;
+
$db = load_database();
$res = "";
$statement = $db->prepare("SELECT password FROM gpass WHERE login=:login");
+echo "protocol=$PROTOCOL_VERSION\n";
+
for ($i=0; isset($_POST["k$i"]); $i++)
{
$statement->bindValue(":login", $_POST["k$i"]);
diff --git a/server/ressources/gpass.js b/server/ressources/gpass.js
index 4dc90ea..61bf4ff 100755
--- a/server/ressources/gpass.js
+++ b/server/ressources/gpass.js
@@ -37,13 +37,12 @@ function generate_password()
// numbers 48 - 57
// upper 65 - 90
// lower 97 - 122
- var symbols = new Array(40, 47, 48, 57, 65, 90, 97, 122, 123, 126);
- // var symbols = new Array(32, 47, 58, 64, 91, 96, 123, 126, 48, 57, 65, 90, 97, 122);
+ // Give priority to letters (65 - 122 duplicated in front and end of array)
+ var symbols = new Array(65, 90, 97, 122, 40, 47, 48, 57, 65, 90, 97, 122, 123, 126, 65, 90, 97, 122);
field = document.getElementById("new_password");
var res = "";
- //for(i=0; i<16; i++)
while (res.length < 16)
{
a = Math.round(Math.random() * (symbols.length/2) * 2);