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/striped
|
||||
bl-themes/log
|
||||
bl-themes/micro
|
10
install.php
10
install.php
|
@ -423,7 +423,6 @@ function install($adminPassword, $timezone)
|
|||
'tokenAuthTTL'=>'2009-03-15 14:00',
|
||||
'twitter'=>'',
|
||||
'facebook'=>'',
|
||||
'googlePlus'=>'',
|
||||
'instagram'=>'',
|
||||
'codepen'=>'',
|
||||
'linkedin'=>'',
|
||||
|
@ -565,9 +564,14 @@ if (isset($_GET['demo'])) {
|
|||
|
||||
// Install by POST method
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
if (Text::length($_POST['password'])<6) {
|
||||
$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);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
@ -615,6 +619,10 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
|||
?>
|
||||
<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">
|
||||
<input type="hidden" name="timezone" id="jstimezone" value="UTC">
|
||||
|
||||
|
|
Loading…
Reference in New Issue