From: Alexander Ebert Date: Tue, 17 Mar 2015 16:39:06 +0000 (+0100) Subject: Truncating report message to 64.000 characters X-Git-Tag: 2.1.2~35 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=304afef1cd5f0e56fdd8cf2726a06fd9dfeeaefb;p=GitHub%2FWoltLab%2FWCF.git Truncating report message to 64.000 characters --- diff --git a/com.woltlab.wcf/templates/moderationReportDialog.tpl b/com.woltlab.wcf/templates/moderationReportDialog.tpl index e0d98db767..afcbcfaf2c 100644 --- a/com.woltlab.wcf/templates/moderationReportDialog.tpl +++ b/com.woltlab.wcf/templates/moderationReportDialog.tpl @@ -6,7 +6,7 @@
- + {lang}wcf.moderation.report.reason.description{/lang}
diff --git a/wcfsetup/install/files/lib/data/moderation/queue/ModerationQueueReportAction.class.php b/wcfsetup/install/files/lib/data/moderation/queue/ModerationQueueReportAction.class.php index cb555c076d..aa6845cc11 100644 --- a/wcfsetup/install/files/lib/data/moderation/queue/ModerationQueueReportAction.class.php +++ b/wcfsetup/install/files/lib/data/moderation/queue/ModerationQueueReportAction.class.php @@ -113,6 +113,10 @@ class ModerationQueueReportAction extends ModerationQueueAction { WCF::getSession()->checkPermissions(array('user.profile.canReportContent')); $this->readString('message'); + if (mb_strlen($this->parameters['message']) > 64000) { + // we allow only up to 64.000 characters (~1.5 below TEXT maximum) + $this->parameters['message'] = mb_substr($this->parameters['messages'], 0, 64000); + } $this->validatePrepareReport(); }