forked from leftypol/leftypol
post.php: restore password length limit
This commit is contained in:
parent
8b2f002582
commit
57324f169d
1 changed files with 5 additions and 0 deletions
5
post.php
5
post.php
|
@ -1011,6 +1011,11 @@ function handle_post(Context $ctx)
|
|||
}
|
||||
}
|
||||
|
||||
// We must do this check now before the passowrd is hashed and overwritten.
|
||||
if (\mb_strlen($_POST['password']) > 20) {
|
||||
error(\sprintf($config['error']['toolong'], 'password'));
|
||||
}
|
||||
|
||||
$post['name'] = $_POST['name'] != '' ? $_POST['name'] : $config['anonymous'];
|
||||
$post['subject'] = $_POST['subject'];
|
||||
$post['email'] = str_replace(' ', '%20', htmlspecialchars($_POST['email']));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue