Server doesn't known clear master key anymore

This commit is contained in:
Gregory Soutade
2013-10-12 12:00:12 +02:00
parent 916d26b785
commit a9fc6d00ee
3 changed files with 263 additions and 5 deletions

View File

@@ -31,8 +31,9 @@ $user = (isset($_POST['user'])) ? $_POST['user'] : "";
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<link rel="stylesheet" type="text/css" href="/ressources/gpass.css" />
<link rel="stylesheet" type="text/css" href="ressources/gpass.css" />
<script src="ressources/gpass.js"></script>
<script src="ressources/jssha256.js"></script>
<?php
global $user;
if ($user == "")
@@ -44,6 +45,7 @@ else
<body>
<?php
global $mkey;
if (isset($_POST['create_user']))
{
if (create_user($_POST['user']))
@@ -101,7 +103,7 @@ else
}
}
echo "</select>\n";
echo ' <b>Master key </b> <input type="password" name="mkey"/> <input name="list" type="submit" value="See"/>' . "\n";
echo ' <b>Master key </b> <input id="see_password" type="password" name="mkey"/> <input name="see" type="submit" value="See" onclick="a = document.getElementById(\'see_password\') ; a.value=digest256(a.value);"/>' . "\n";
}
?>
</form>
@@ -166,7 +168,7 @@ if ($user != "")
echo 'password <input id="new_password" type="text" name="pwd"/>';
echo 'master key <input type="password" name="mkey"/>';
echo '<input type="button" value="Generate password" onClick="generate_password();"/>';
echo "<input type=\"submit\" name=\"add\" value=\"Add\" onclick='a = document.getElementById(\"new_url\") ; a.value = url_domain(a.value);'/>";
echo "<input type=\"submit\" name=\"add\" value=\"Add\" onclick=\"a = document.getElementById('new_url') ; a.value = url_domain(a.value); a = document.getElementById('see_password') ; a.value=digest256(a.value);\"/>";
echo '</form>' . "\n";
}
?>