From 9d4205acf681f136290be69eb6b830b68f7e0009 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Fri, 11 Aug 2023 13:57:21 +0200 Subject: [PATCH] correct validation of hostingplan name and description Signed-off-by: Michael Kaufmann --- lib/Froxlor/Api/Commands/HostingPlans.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Froxlor/Api/Commands/HostingPlans.php b/lib/Froxlor/Api/Commands/HostingPlans.php index 971307b5..ce5f4832 100644 --- a/lib/Froxlor/Api/Commands/HostingPlans.php +++ b/lib/Froxlor/Api/Commands/HostingPlans.php @@ -200,8 +200,8 @@ class HostingPlans extends ApiCommand implements ResourceEntity $value_arr['logviewenabled'] = $this->getBoolParam('logviewenabled', true, 0); // validation - $name = Validate::validate(trim($name), 'name', '', '', [], true); - $description = Validate::validate(str_replace("\r\n", "\n", $description), 'description', Validate::REGEX_DESC_TEXT); + $name = Validate::validate(trim($name), 'name', Validate::REGEX_DESC_TEXT, '', [], true); + $description = Validate::validate(str_replace("\r\n", "\n", $description), 'description', Validate::REGEX_CONF_TEXT); if (Settings::Get('system.mail_quota_enabled') != '1') { $value_arr['email_quota'] = -1; @@ -382,8 +382,8 @@ class HostingPlans extends ApiCommand implements ResourceEntity $value_arr['logviewenabled'] = $this->getBoolParam('logviewenabled', true, $result['logviewenabled']); // validation - $name = Validate::validate(trim($name), 'name', '', '', [], true); - $description = Validate::validate(str_replace("\r\n", "\n", $description), 'description', Validate::REGEX_DESC_TEXT); + $name = Validate::validate(trim($name), 'name', Validate::REGEX_DESC_TEXT, '', [], true); + $description = Validate::validate(str_replace("\r\n", "\n", $description), 'description', Validate::REGEX_CONF_TEXT); if (Settings::Get('system.mail_quota_enabled') != '1') { $value_arr['email_quota'] = -1;