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/functions.php +4 -5 1.6.271.6.24 View file →
@@ -1247,17 +1247,16 @@
1247 1247 *
1248 1248 * @return string
1249 1249 **/
1250 1250 function weforms_get_pain_text( $value ) {
1251 - // Security fix: Removed unsafe unserialize() call to prevent PHP Object Injection.
1252 - // WordPress's get_metadata() already handles deserialization safely.
1253 - // Any serialized strings at this point should be treated as untrusted user input.
1251 + if ( is_serialized( $value ) ) {
1252 + $value = unserialize( $value );
1253 + }
1254 1254
1255 1255 if ( is_array( $value ) ) {
1256 1256 $string_value = [];
1257 1257 foreach ( $value as $key => $single_value ) {
1258 - // Only recursively process arrays, not serialized strings
1259 - if ( is_array( $single_value ) ) {
1258 + if ( is_array( $single_value ) || is_serialized( $single_value ) ) {
1260 1259 $single_value = weforms_get_pain_text( $single_value );
1261 1260 }
1262 1261
1263 1262 $single_value = ucwords( str_replace( [ '_', '-' ], ' ', $key ) ) . ': ' . ucwords( $single_value );