Browse Source

Fix 387ebe9c0c for reports, extract limit to variable, give more descriptive error name

main
discomrade 3 years ago
parent
commit
49b5fb75a6
  1. 5
      inc/config.php
  2. 6
      post.php
  3. 2
      templates/report.html
  4. 2
      templates/report_delete.html

5
inc/config.php

@ -953,6 +953,9 @@
// Number of reports you can create at once.
$config['report_limit'] = 3;
// Maximum character length of report.
$config['report_max_length'] = 100;
// Allow unfiltered HTML in board subtitle. This is useful for placing icons and links.
$config['allow_subtitle_html'] = false;
@ -1246,7 +1249,7 @@
$config['error']['toomanycross'] = _('Too many cross-board links; post discarded.');
$config['error']['nodelete'] = _('You didn\'t select anything to delete.');
$config['error']['noreport'] = _('You didn\'t select anything to report.');
$config['error']['invalidreport'] = _('The reason was too long.');
$config['error']['toolongreport'] = _('The reason was too long.');
$config['error']['toomanyreports'] = _('You can\'t report that many posts at once.');
$config['error']['invalidpassword'] = _('Wrong password…');
$config['error']['invalidimg'] = _('Invalid image.');

6
post.php

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

2
templates/report.html

@ -11,7 +11,7 @@
<div><h1>Attention!</h1><p>This form is only for reporting <strong>child pornography</strong>, <strong>bot spam</strong> and <strong>credit card numbers, social security numbers or banking information</strong>. DMCA requests and all other deletion requests <em>MUST</em> be sent via email to [email protected].</p><p>8chan is unmoderated and allows posts without collecting <em>ANY</em> information from the poster less the details of their post. Furthermore, all boards on 8chan are user created and not actively monitored by anyone but the board creator.</p><p>8chan has a small volunteer staff to handle this queue, please do not waste their time by filling it with nonsense! <em>If you made a report with this tool and the post was not deleted, <strong>do not make the report again!</strong> Email [email protected] instead.</em> Abuse of the global report system could lead to address blocks against your IP from 8chan.</p><p>Again, 8chan's global volunteers <em>do not</em> handle board specific issues. You most likely want to click "Report" instead to reach the creator and volunteers he assigned to this board.</p>
{% endif %}
<p>{% trans %}Enter reason below...{% endtrans %}</p>
<input type="text" id="reason" name="reason" value="{{ reason_prefill|e|addslashes }}">
<input type="text" id="reason" name="reason" maxlength="{{ config.report_max_length }}" value="{{ reason_prefill|e|addslashes }}">
{% if config.report_captcha %}
<p>{% trans %}To submit your report, please fill out the CAPTCHA below.{% endtrans %}</p>
{{ captcha['html'] }}<br/>

2
templates/report_delete.html

@ -10,7 +10,7 @@
<div id="report-fields">
<label for="reason">{% trans %}Reason{% endtrans %}</label>
<input id="reason" type="text" name="reason" size="20" maxlength="30" />
<input id="reason" type="text" name="reason" size="20" maxlength="{{ config.report_max_length }}" />
<input type="submit" name="report" value="{% trans %}Report{% endtrans %}" />
</div>
</div>
Loading…
Cancel
Save