From 304afef1cd5f0e56fdd8cf2726a06fd9dfeeaefb Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 17 Mar 2015 17:39:06 +0100 Subject: [PATCH] Truncating report message to 64.000 characters --- com.woltlab.wcf/templates/moderationReportDialog.tpl | 2 +- .../moderation/queue/ModerationQueueReportAction.class.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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(); } -- 2.20.1