1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-09-24 03:28:22 +02:00

Merge pull request #215 from antedeguemon/master

Prevents reports with too many characters
This commit is contained in:
Marcin Łabanowski 2017-07-23 17:55:22 +02:00 committed by GitHub
commit 3e23c028de
2 changed files with 4 additions and 0 deletions

View File

@ -1108,6 +1108,7 @@
$config['error']['toomanycross'] = _('Too many cross-board links; post discarded.'); $config['error']['toomanycross'] = _('Too many cross-board links; post discarded.');
$config['error']['nodelete'] = _('You didn\'t select anything to delete.'); $config['error']['nodelete'] = _('You didn\'t select anything to delete.');
$config['error']['noreport'] = _('You didn\'t select anything to report.'); $config['error']['noreport'] = _('You didn\'t select anything to report.');
$config['error']['invalidreport'] = _('The reason was too long.');
$config['error']['toomanyreports'] = _('You can\'t report that many posts at once.'); $config['error']['toomanyreports'] = _('You can\'t report that many posts at once.');
$config['error']['invalidpassword'] = _('Wrong password…'); $config['error']['invalidpassword'] = _('Wrong password…');
$config['error']['invalidimg'] = _('Invalid image.'); $config['error']['invalidimg'] = _('Invalid image.');

View File

@ -288,6 +288,9 @@ if (isset($_POST['delete'])) {
if (empty($report)) if (empty($report))
error($config['error']['noreport']); error($config['error']['noreport']);
if (strlen($report) > 30)
error($config['error']['invalidreport']);
if (count($report) > $config['report_limit']) if (count($report) > $config['report_limit'])
error($config['error']['toomanyreports']); error($config['error']['toomanyreports']);