Fixed validation rules on registration

Change-Id: I1eed7b81d68b0d5b9783135c12bc0881807a8cb8
Signed-off-by: smarcet <smarcet@gmail.com>
This commit is contained in:
smarcet 2020-06-10 21:43:50 -03:00
parent f4418928e3
commit ee06811e57
2 changed files with 6 additions and 6 deletions

View File

@ -157,7 +157,7 @@ final class RegisterController extends Controller
'last_name' => 'required|string|max:100',
'country_iso_code' => 'required|string|country_iso_alpha2_code',
'email' => 'required|string|email|max:255',
'password' => 'required|string|min:8|max:100|confirmed',
'password' => 'required|string|min:8|max:50|confirmed',
'g-recaptcha-response' => 'required|recaptcha',
]);
}

View File

@ -7,7 +7,7 @@
function hash(message)
{
var hash = CryptoJS.SHA256(message).toString();
console.log('calculated hash '+hash+' from message '+message);
//console.log('calculated hash '+hash+' from message '+message);
return hash;
}
@ -53,7 +53,7 @@
return "error";
}
console.log("sessionState "+sessionState);
//console.log("sessionState "+sessionState);
var sessionStateParts = sessionState.split('.');
if (sessionStateParts.length !== 2)
{
@ -62,8 +62,8 @@
var clientHash = sessionStateParts[0];
var salt = sessionStateParts[1];
console.log("clientHash "+clientHash);
console.log("salt "+salt);
//console.log("clientHash "+clientHash);
//console.log("salt "+salt);
if (!clientHash || !salt)
{
@ -72,7 +72,7 @@
var opbs = $.cookie('op_bs');
if (opbs == "undefined" || typeof(opbs) == "undefined") return "changed";
console.log("opbs "+opbs)
//console.log("opbs "+opbs)
var expectedHash = computeSessionStateHash(clientId, origin, opbs, salt);
return clientHash === expectedHash ? "unchanged" : "changed";
}