Alert when the password lenght is less than 6 characters
This commit is contained in:
parent
026d71e239
commit
c7cec45039
|
@ -18,3 +18,4 @@ bl-themes/massively
|
||||||
bl-themes/hyperspace
|
bl-themes/hyperspace
|
||||||
bl-themes/striped
|
bl-themes/striped
|
||||||
bl-themes/log
|
bl-themes/log
|
||||||
|
bl-themes/micro
|
14
install.php
14
install.php
|
@ -423,7 +423,6 @@ function install($adminPassword, $timezone)
|
||||||
'tokenAuthTTL'=>'2009-03-15 14:00',
|
'tokenAuthTTL'=>'2009-03-15 14:00',
|
||||||
'twitter'=>'',
|
'twitter'=>'',
|
||||||
'facebook'=>'',
|
'facebook'=>'',
|
||||||
'googlePlus'=>'',
|
|
||||||
'instagram'=>'',
|
'instagram'=>'',
|
||||||
'codepen'=>'',
|
'codepen'=>'',
|
||||||
'linkedin'=>'',
|
'linkedin'=>'',
|
||||||
|
@ -565,8 +564,13 @@ if (isset($_GET['demo'])) {
|
||||||
|
|
||||||
// Install by POST method
|
// Install by POST method
|
||||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
install($_POST['password'], $_POST['timezone']);
|
if (Text::length($_POST['password'])<6) {
|
||||||
redirect(HTML_PATH_ROOT);
|
$errorText = $L->g('password-must-be-at-least-6-characters-long');
|
||||||
|
error_log('[ERROR] '.$errorText, 0);
|
||||||
|
} else {
|
||||||
|
install($_POST['password'], $_POST['timezone']);
|
||||||
|
redirect(HTML_PATH_ROOT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -615,6 +619,10 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
?>
|
?>
|
||||||
<p><?php echo $L->get('choose-a-password-for-the-user-admin') ?></p>
|
<p><?php echo $L->get('choose-a-password-for-the-user-admin') ?></p>
|
||||||
|
|
||||||
|
<?php if (!empty($errorText)): ?>
|
||||||
|
<div class="alert alert-danger"><?php echo $errorText ?></div>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
<form id="jsformInstaller" method="post" action="" autocomplete="off">
|
<form id="jsformInstaller" method="post" action="" autocomplete="off">
|
||||||
<input type="hidden" name="timezone" id="jstimezone" value="UTC">
|
<input type="hidden" name="timezone" id="jstimezone" value="UTC">
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue