Changeset 3343982
- Timestamp:
- 08/13/2025 07:32:59 AM (8 months ago)
- Location:
- quiz-master-next/trunk
- Files:
-
- 5 edited
-
css/admin-dashboard-rtl.css (modified) (1 diff)
-
css/admin-dashboard.css (modified) (1 diff)
-
mlw_quizmaster2.php (modified) (2 diffs)
-
php/template-variables.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
quiz-master-next/trunk/css/admin-dashboard-rtl.css
r3248667 r3343982 98 98 .changelog-ul li .feature { 99 99 background: #25bdfe; 100 } 101 102 .changelog-ul li .security { 103 color: #0f0fea; 104 background: #c0c0ff; 105 } 106 107 .changelog-ul li span.security:before { 108 background: #0f0fea; 100 109 } 101 110 -
quiz-master-next/trunk/css/admin-dashboard.css
r3277972 r3343982 134 134 background: #D1FAE5; 135 135 color: #065F46; 136 } 137 138 .changelog-ul li .security { 139 color: #0f0fea; 140 background: #c0c0ff; 141 } 142 143 .changelog-ul li span.security:before { 144 background: #0f0fea; 136 145 } 137 146 -
quiz-master-next/trunk/mlw_quizmaster2.php
r3341668 r3343982 3 3 * Plugin Name: Quiz And Survey Master 4 4 * Description: Easily and quickly add quizzes and surveys to your website. 5 * Version: 10.2. 55 * Version: 10.2.6 6 6 * Author: ExpressTech 7 7 * Author URI: https://quizandsurveymaster.com/ … … 44 44 * @since 4.0.0 45 45 */ 46 public $version = '10.2. 5';46 public $version = '10.2.6'; 47 47 48 48 /** -
quiz-master-next/trunk/php/template-variables.php
r3341668 r3343982 1150 1150 $answers_random = array(); 1151 1151 $quiz_answer_random_ids = sanitize_text_field( wp_unslash( $_POST['quiz_answer_random_ids'] ) ); 1152 $quiz_answer_random_ids = q mn_sanitize_random_ids_data( $quiz_answer_random_ids );1152 $quiz_answer_random_ids = qsm_safe_unserialize( $quiz_answer_random_ids ); 1153 1153 if ( ! empty( $quiz_answer_random_ids[ $answer['id'] ] ) && is_array( $quiz_answer_random_ids[ $answer['id'] ] ) ) { 1154 1154 foreach ( $quiz_answer_random_ids[ $answer['id'] ] as $key ) { … … 1656 1656 1657 1657 /** 1658 * Sanitize Input Array Data 1659 * 1660 * @params $qmn_sanitize_random_ids Questions Data 1661 * @return $qmn_sanitize_random_ids Returns sanitized data 1662 */ 1663 function qmn_sanitize_random_ids_data( $qmn_sanitize_random_ids ) { 1664 if ( is_string( $qmn_sanitize_random_ids ) ) { 1665 if ( preg_match( '/^(O|C):\d+:/', $qmn_sanitize_random_ids ) ) { 1666 return ''; 1667 } 1668 1669 if ( is_serialized( $qmn_sanitize_random_ids ) ) { 1670 $unserialized = maybe_unserialize( $qmn_sanitize_random_ids ); 1671 if ( ! is_object( $unserialized ) && ! is_resource( $unserialized ) ) { 1672 return $unserialized; 1673 } 1674 } 1675 } 1676 1677 return $qmn_sanitize_random_ids; 1658 * Safely unserialize a value while blocking objects/resources and nested serialized payloads. 1659 * 1660 * @param mixed $value Serialized string or any other value. 1661 * @return mixed|null Unserialized value on success, original value if not serialized, or null if rejected. 1662 */ 1663 function qsm_safe_unserialize( $value ) { 1664 $result = $value; 1665 1666 // If it's not a serialized string, keep original value 1667 if ( is_string( $value ) && is_serialized( $value ) ) { 1668 // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_unserialize, WordPress.PHP.NoSilencedErrors.Discouraged 1669 $unserialized_value = unserialize( $value, [ 'allowed_classes' => false ] ); 1670 1671 $is_invalid_blob = ( false === $unserialized_value && 'b:0;' !== $value ); 1672 $is_disallowed_type = is_object( $unserialized_value ) || is_resource( $unserialized_value ); 1673 1674 if ( $is_invalid_blob || $is_disallowed_type ) { 1675 $result = null; 1676 } else { 1677 $contains_nested_serialization = false; 1678 1679 $scan_for_nested = static function ( $item ) use ( &$contains_nested_serialization ) { 1680 if ( is_string( $item ) && ( is_serialized( $item ) || preg_match( '/(^|[;:{])(?:[OC]):\d+:"/i', $item ) ) ) { 1681 $contains_nested_serialization = true; 1682 } 1683 }; 1684 1685 if ( is_array( $unserialized_value ) ) { 1686 array_walk_recursive( $unserialized_value, $scan_for_nested ); 1687 } else { 1688 $scan_for_nested( $unserialized_value ); 1689 } 1690 1691 $result = $contains_nested_serialization ? null : $unserialized_value; 1692 } 1693 } 1694 1695 return $result; 1678 1696 } 1679 1697 -
quiz-master-next/trunk/readme.txt
r3341668 r3343982 5 5 Tested up to: 6.8 6 6 Requires PHP: 5.4 7 Stable tag: 10.2. 57 Stable tag: 10.2.6 8 8 License: GPLv2 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 222 222 223 223 == Changelog == 224 = 10.2.6 ( August 13, 2025 ) = 225 * Security: Completed fix for quiz_answer_random_ids vulnerability using secure unserialize() with allowed_classes => false 226 224 227 = 10.2.5 ( August 8, 2025 ) = 225 228 * Feature: Added multi-language support for quiz redirect URLs
Note: See TracChangeset
for help on using the changeset viewer.