From 878515ce86c316a5efe495fabd976038ec34ffd0 Mon Sep 17 00:00:00 2001 From: root <you@example.com> Date: Tue, 9 Apr 2024 14:49:50 +0530 Subject: [PATCH] #Fixes::156594583::Chaitanya N::Burp Suite POST request is allowing to create webform without name and for unsupported module issue is fixed --- pkg/vtiger/modules/Webforms/settings/actions/Save.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/vtiger/modules/Webforms/settings/actions/Save.php b/pkg/vtiger/modules/Webforms/settings/actions/Save.php index ae549d4f7..7ae864e1c 100644 --- a/pkg/vtiger/modules/Webforms/settings/actions/Save.php +++ b/pkg/vtiger/modules/Webforms/settings/actions/Save.php @@ -41,13 +41,11 @@ class Settings_Webforms_Save_Action extends Settings_Vtiger_Index_Action { if (!$fieldValue) { $fieldValue = $fieldModel->get('defaultvalue'); } - if($fieldModel->isMandatory() && empty(trim($fieldValue))) { throw new AppException(vtranslate('LBL_MANDATORY_FIELD_MISSING')); }else if($fieldName == 'targetmodule' && !array_key_exists($fieldValue,$supportedModules)){ throw new Exception('Target module is not supported to create webform'); } - $recordModel->set($fieldName, $fieldValue); } @@ -69,4 +67,4 @@ class Settings_Webforms_Save_Action extends Settings_Vtiger_Index_Action { public function validateRequest(Vtiger_Request $request) { $request->validateWriteAccess(); } -} +} \ No newline at end of file -- GitLab