Skip to content

Commit 57ce605

Browse files
committed
v7.4.3
1 parent 6822269 commit 57ce605

File tree

21 files changed

+735
-688
lines changed

21 files changed

+735
-688
lines changed

application/config/constants.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php if ( ! defined( 'BASEPATH' ) ) {
22
exit( 'No direct script access allowed' );}
33

4-
define( 'UIFORM_VERSION', '7.3.9' );
4+
define( 'UIFORM_VERSION', '7.4.3' );
55
define( 'ZIGAFORM_F_LITE', 1 );
66
define( 'UIFORM_DEBUG', 0 );
77
define( 'UIFORM_DEMO', 0 );

application/helpers/common_helper.php

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,34 @@ public static function sanitizeInput_html($string)
191191
return $string;
192192
}
193193

194+
public static function sanitizeInput_front_html($string)
195+
{
196+
if (!is_string($string)) {
197+
return $string;
198+
}
199+
200+
// Decode existing entities to prevent double encoding
201+
$string = html_entity_decode($string, ENT_QUOTES, 'UTF-8');
202+
203+
// Strip slashes added by magic quotes or manual escaping
204+
$string = stripslashes($string);
205+
206+
// Strip potential dangerous tags and attributes
207+
$string = strip_tags($string, '<a><b><i><strong><em><ul><li><ol>'); // Allow only safe tags
208+
209+
// Encode special characters to prevent HTML injection
210+
$string = htmlspecialchars($string, ENT_QUOTES, 'UTF-8');
211+
212+
// Remove dangerous JavaScript attributes
213+
$string = preg_replace('/(on\w*|style)=["\'].*?["\']/i', '', $string);
214+
215+
// Normalize whitespaces and trim
216+
$string = preg_replace('/[\n\r\t]+/', ' ', $string);
217+
$string = trim($string);
218+
219+
return $string;
220+
}
221+
194222

195223
public static function sanitizeInput_data_html($string)
196224
{
@@ -285,6 +313,22 @@ public static function sanitizeRecursive_html($data)
285313
}
286314
}
287315

316+
/**
317+
* Sanitize recursive
318+
*
319+
* @param string $data array
320+
*
321+
* @return array
322+
*/
323+
public static function sanitizeRecursive_front_html($data)
324+
{
325+
if ( is_array($data)) {
326+
return array_map(array( 'Uiform_Form_Helper', 'sanitizeRecursive_front_html' ), $data);
327+
} else {
328+
return self::sanitizeInput_front_html($data);
329+
}
330+
}
331+
288332

289333
public static function data_encrypt($string, $key)
290334
{

application/modules/formbuilder/controllers/frontend.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,8 +1193,8 @@ public function process_form($isMultiStep = false)
11931193
}
11941194
$is_demo = ( $_POST['zgfm_is_demo'] ) ? intval(Uiform_Form_Helper::sanitizeInput(trim($_POST['zgfm_is_demo']))) : 0;
11951195
$this->current_form_id = $form_id;
1196-
$form_fields = ( isset($_POST['uiform_fields']) && $_POST['uiform_fields'] ) ? array_map(array( 'Uiform_Form_Helper', 'sanitizeRecursive_html' ), $_POST['uiform_fields']) : array();
1197-
$form_avars = ( isset($_POST['zgfm_avars']) && $_POST['zgfm_avars'] ) ? array_map(array( 'Uiform_Form_Helper', 'sanitizeRecursive_html' ), $_POST['zgfm_avars']) : array();
1196+
$form_fields = ( isset($_POST['uiform_fields']) && $_POST['uiform_fields'] ) ? array_map(array( 'Uiform_Form_Helper', 'sanitizeRecursive_front_html' ), $_POST['uiform_fields']) : array();
1197+
$form_avars = ( isset($_POST['zgfm_avars']) && $_POST['zgfm_avars'] ) ? array_map(array( 'Uiform_Form_Helper', 'sanitizeRecursive_front_html' ), $_POST['zgfm_avars']) : array();
11981198
$form_f_tmp = array();
11991199
$form_f_rec_tmp = array();
12001200

assets/backend/json/manifest.json

Lines changed: 646 additions & 646 deletions
Large diffs are not rendered by default.

change_log.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
version 7.4.3
2+
[update] - Implemented a critical security patch to address potential vulnerabilities and enhance system protection.
3+
-----------------------------------------------------------------------------------------------------------------
14
version 7.3.9
25
[fix] - minor issues
36
-----------------------------------------------------------------------------------------------------------------

i18n/languages/backend/wprockf.pot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Copyright (C) 2024 Zigaform WP Cost Estimation Form Builder 7.3.9
2-
# This file is distributed under the same license as the Zigaform WP Cost Estimation Form Builder 7.3.9 package.
1+
# Copyright (C) 2025 Zigaform WP Cost Estimation Form Builder 7.4.3
2+
# This file is distributed under the same license as the Zigaform WP Cost Estimation Form Builder 7.4.3 package.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: Zigaform WP Cost Estimation Form Builder 7.3.9\n"
5+
"Project-Id-Version: Zigaform WP Cost Estimation Form Builder 7.4.3\n"
66
"MIME-Version: 1.0\n"
77
"Content-Type: text/plain; charset=UTF-8\n"
88
"Content-Transfer-Encoding: 8bit\n"
9-
"POT-Creation-Date: 2024-11-15 01:58+0000\n"
9+
"POT-Creation-Date: 2025-01-22 02:01+0000\n"
1010
"X-Poedit-Basepath: ..\n"
1111
"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
1212
"X-Poedit-SearchPath-0: .\n"

i18n/languages/front/wprockf-de_DE.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Copyright (C) 2024 Zigaform PHP Form Builder 7.3.9
2-
# This file is distributed under the same license as the Zigaform PHP Form Builder 7.3.9 package.
1+
# Copyright (C) 2025 Zigaform PHP Form Builder 7.4.3
2+
# This file is distributed under the same license as the Zigaform PHP Form Builder 7.4.3 package.
33
msgid ""
44
msgstr ""
55
"Project-Id-Version: Rocket form\n"

i18n/languages/front/wprockf-en_US.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Copyright (C) 2024 Zigaform PHP Form Builder 7.3.9
2-
# This file is distributed under the same license as the Zigaform PHP Form Builder 7.3.9 package.
1+
# Copyright (C) 2025 Zigaform PHP Form Builder 7.4.3
2+
# This file is distributed under the same license as the Zigaform PHP Form Builder 7.4.3 package.
33
msgid ""
44
msgstr ""
55
"Project-Id-Version: Rocket form\n"

i18n/languages/front/wprockf-es_ES.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Copyright (C) 2024 Zigaform PHP Form Builder 7.3.9
2-
# This file is distributed under the same license as the Zigaform PHP Form Builder 7.3.9 package.
1+
# Copyright (C) 2025 Zigaform PHP Form Builder 7.4.3
2+
# This file is distributed under the same license as the Zigaform PHP Form Builder 7.4.3 package.
33
msgid ""
44
msgstr ""
55
"Project-Id-Version: Rocket form\n"

i18n/languages/front/wprockf-fr_FR.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Copyright (C) 2024 Zigaform PHP Form Builder 7.3.9
2-
# This file is distributed under the same license as the Zigaform PHP Form Builder 7.3.9 package.
1+
# Copyright (C) 2025 Zigaform PHP Form Builder 7.4.3
2+
# This file is distributed under the same license as the Zigaform PHP Form Builder 7.4.3 package.
33
msgid ""
44
msgstr ""
55
"Project-Id-Version: Rocket form\n"

0 commit comments

Comments
 (0)