diff --git a/inc/config.php b/inc/config.php index 2fecf59b..d589f203 100644 --- a/inc/config.php +++ b/inc/config.php @@ -679,6 +679,9 @@ // How many ban appeals can be made for a single ban? $config['ban_appeals_max'] = 1; + // Maximum text length of an appeal. + $config['appeal_text_max_length'] = 300; + // Show moderator name on ban page. $config['show_modname'] = false; diff --git a/post.php b/post.php index 3a313b81..ce269b03 100644 --- a/post.php +++ b/post.php @@ -1395,6 +1395,9 @@ if (isset($_POST['delete'])) { if ($ban['expires'] && $ban['expires'] - $ban['created'] <= $config['ban_appeals_min_length']) { error(_("You cannot appeal a ban of this length.")); } + + if (strlen($_POST['appeal']) > $config['appeal_text_max_length']) + error(_("Your appeal is too long.")); $query = query("SELECT `denied` FROM ``ban_appeals`` WHERE `ban_id` = $ban_id") or error(db_error()); $ban_appeals = $query->fetchAll(PDO::FETCH_COLUMN); diff --git a/templates/banned.html b/templates/banned.html index b4cdf3f9..3c759b35 100644 --- a/templates/banned.html +++ b/templates/banned.html @@ -135,7 +135,7 @@ {% endif %}
- +
{% endif %}