PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.6.24
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.6.24
1.6.7 1.6.8 1.6.9 1.6.12 1.6.13 1.6.14 1.6.15 1.6.16 1.6.17 1.6.18 1.6.19 1.6.2 1.6.20 1.6.21 1.6.22 1.6.23 1.6.24 1.6.25 1.6.26 1.6.27 1.6.28 1.6.3 1.6.4 1.6.5 1.6.6 All 74 releases
← All changes | includes/class-form.php +2 -32 1.6.281.6.24 View file →
@@ -28,36 +28,8 @@
28 28 */
29 29 public $data = null;
30 30
31 31 /**
32 - * Derived/formatted stats & metadata used by admin/AJAX/API responses.
33 - * Declared explicitly to avoid PHP 8.2 "dynamic property" deprecations.
34 - *
35 - * @var int
36 - */
37 - public $entries = 0;
38 -
39 - /**
40 - * @var array
41 - */
42 - public $settings = [];
43 -
44 - /**
45 - * @var int
46 - */
47 - public $views = 0;
48 -
49 - /**
50 - * @var int
51 - */
52 - public $payments = 0;
53 -
54 - /**
55 - * @var array
56 - */
57 - public $author = [];
58 -
59 - /**
60 32 * Form fields
61 33 *
62 34 * @var array
63 35 */
@@ -125,12 +97,9 @@
125 97
126 98 $form_fields = [];
127 99
128 100 foreach ( $fields as $key => $content ) {
129 - // Security fix: Prevent PHP Object Injection by restricting allowed classes
130 - $field = is_serialized( $content->post_content )
131 - ? @unserialize( $content->post_content, [ 'allowed_classes' => false ] )
132 - : $content->post_content;
101 + $field = maybe_unserialize( $content->post_content );
133 102
134 103 if ( empty( $field['template'] ) ) {
135 104 continue;
136 105 }
@@ -432,8 +401,9 @@
432 401 */
433 402 public function get_changed_fields( $form_fields ) {
434 403 $changed_fields = array();
435 404 foreach ( $form_fields as $field ) {
405 + $org_field = $field['original_name'];
436 406 // All form fields should have an original name.
437 407 if ( empty( $field['original_name'] ) ) {
438 408 continue;
439 409 }