0
0

Added secondary security login with double password

This commit is contained in:
Bryan
2019-06-06 00:59:20 +02:00
parent ea4becd52d
commit 6c50b051bc
2 changed files with 19 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
function login ( ) {
var username = document.getElementById ( "form-username" ).value;
var password = document.getElementById ( "form-password" ).value;
password = SHA512 ( password );
hashedpassword = SHA512 ( password );
var xhr = new XMLHttpRequest ( );
xhr.open ( "POST", 'login', true );
xhr.onreadystatechange = function ( ) {
@@ -24,6 +24,7 @@ function login ( ) {
data = new FormData ( );
data.append('username', username);
data.append('password', password);
data.append('hashedpassword', hashedpassword);
xhr.send( data );
}