Password length must be at least 6 characters long
This commit is contained in:
parent
8aa64a65e6
commit
4950c65bac
10
install.php
10
install.php
|
@ -309,10 +309,10 @@ function install($adminPassword, $email, $timezoneOffset)
|
||||||
|
|
||||||
file_put_contents(PATH_DATABASES.'site.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX);
|
file_put_contents(PATH_DATABASES.'site.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX);
|
||||||
|
|
||||||
|
// File users.php
|
||||||
$salt = getRandomString();
|
$salt = getRandomString();
|
||||||
$passwordHash = sha1($adminPassword.$salt);
|
$passwordHash = sha1($adminPassword.$salt);
|
||||||
|
|
||||||
// File users.php
|
|
||||||
$data = array(
|
$data = array(
|
||||||
'admin'=>array(
|
'admin'=>array(
|
||||||
'firstName'=>'',
|
'firstName'=>'',
|
||||||
|
@ -329,7 +329,11 @@ function install($adminPassword, $email, $timezoneOffset)
|
||||||
file_put_contents(PATH_DATABASES.'users.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX);
|
file_put_contents(PATH_DATABASES.'users.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX);
|
||||||
|
|
||||||
// File security.php
|
// File security.php
|
||||||
|
$randomKey = getRandomString();
|
||||||
|
$randomKey = sha1($randomKey);
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
|
'key1'=>$randomKey,
|
||||||
'minutesBlocked'=>5,
|
'minutesBlocked'=>5,
|
||||||
'numberFailuresAllowed'=>10,
|
'numberFailuresAllowed'=>10,
|
||||||
'blackList'=>array()
|
'blackList'=>array()
|
||||||
|
@ -424,9 +428,9 @@ function checkPOST($args)
|
||||||
global $Language;
|
global $Language;
|
||||||
|
|
||||||
// Check empty password
|
// Check empty password
|
||||||
if(empty($args['password']))
|
if( strlen($args['password']) < 6 )
|
||||||
{
|
{
|
||||||
return '<div>'.$Language->g('The password field is empty').'</div>';
|
return '<div>'.$Language->g('Password must be at least 6 characters long').'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check invalid email
|
// Check invalid email
|
||||||
|
|
|
@ -15,9 +15,9 @@ class Email {
|
||||||
<head>
|
<head>
|
||||||
<title>BLUDIT</title>
|
<title>BLUDIT</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body style="background-color: #f1f1f1;">
|
||||||
<div style="margin: 0px auto; border: 1px solid #2672ec; padding: 10px; font-size: 14px;">
|
<div style="margin: 0px auto; padding: 10px; font-size: 14px; width: 70%; max-width: 600px;">
|
||||||
<div style="font-size: 26px; padding: 10px; background-color: #2672ec; color: #FFFFFF;">BLUDIT</div>
|
<div style="font-size: 26px;">BLUDIT</div>
|
||||||
'.$args['message'].'
|
'.$args['message'].'
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
class Security extends dbJSON
|
class Security extends dbJSON
|
||||||
{
|
{
|
||||||
private $dbFields = array(
|
private $dbFields = array(
|
||||||
|
'key1'=>'Where we go we dont need roads',
|
||||||
'minutesBlocked'=>5,
|
'minutesBlocked'=>5,
|
||||||
'numberFailuresAllowed'=>10,
|
'numberFailuresAllowed'=>10,
|
||||||
'blackList'=>array()
|
'blackList'=>array()
|
||||||
|
|
|
@ -196,5 +196,7 @@
|
||||||
"general-settings": "General settings",
|
"general-settings": "General settings",
|
||||||
"advanced-settings": "Advanced settings",
|
"advanced-settings": "Advanced settings",
|
||||||
"manage-users": "Manage users",
|
"manage-users": "Manage users",
|
||||||
"view-and-edit-your-profile": "View and edit your profile."
|
"view-and-edit-your-profile": "View and edit your profile.",
|
||||||
|
|
||||||
|
"password-must-be-at-least-6-characters-long": "Password must be at least 6 characters long"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue