changed manual comparaisons to
This commit is contained in:
parent
d0bb2e59b2
commit
d175725459
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
$SESSION_COOKIE_NAME = "connection_id";
|
$SESSION_COOKIE_NAME = "connection_id";
|
||||||
$MAX_COOKIE_LIFE = time() + 86400 * 30; // 30 days max
|
$MAX_COOKIE_LIFE = time() + 86400 * 30; // 30 days max
|
||||||
|
$MINIMAL_PASSWORD_LENGTH = 8;
|
||||||
|
|
||||||
$config_array = json_decode(file_get_contents("config.json", true));
|
$config_array = json_decode(file_get_contents("config.json", true));
|
||||||
|
|
||||||
|
@ -29,8 +29,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|||||||
// Validate password
|
// Validate password
|
||||||
if (empty(trim($_POST["password"]))) {
|
if (empty(trim($_POST["password"]))) {
|
||||||
$password_err = "Please enter a password.";
|
$password_err = "Please enter a password.";
|
||||||
} elseif (strlen(trim($_POST["password"])) < 6) {
|
} elseif (strlen(trim($_POST["password"])) < $MINIMAL_PASSWORD_LENGTH) {
|
||||||
$password_err = "Password must have atleast 6 characters.";
|
$password_err = "Password must have atleast $MINIMAL_PASSWORD_LENGTH characters.";
|
||||||
} else {
|
} else {
|
||||||
$password = trim($_POST["password"]);
|
$password = trim($_POST["password"]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user