mirror of
https://framagit.org/framasoft/framadate/framadate
synced 2026-01-23 02:14:06 +00:00
Actually enforce the length limitation on the poll creator name
Show a nice error message if it's too long (not on the edit page because there's no support for this right now) mbstring is now a required extension Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
a5c7df64b2
commit
36cef8cc39
6 changed files with 22 additions and 3 deletions
|
|
@ -143,7 +143,9 @@ if (isset($_POST['update_poll_info'])) {
|
|||
$updated = true;
|
||||
}
|
||||
} elseif ($field === 'name') {
|
||||
$admin_name = $inputService->filterName($_POST['name']);
|
||||
$admin_name = $_POST['name'];
|
||||
$admin_name = mb_substr($admin_name, 0, 32);
|
||||
$admin_name = $inputService->filterName($admin_name);
|
||||
if ($admin_name) {
|
||||
$poll->admin_name = $admin_name;
|
||||
$updated = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue