PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 5.5.0
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v5.5.0
5.12.0 5.13.0 5.13.1 5.11.0 5.10.0 5.9.0 5.8.0 5.8.1 5.7.0 5.6.2 5.6.3 5.6.1 5.6.0 5.5.0 5.4.0 5.3.2 5.3.1 5.1.6 5.1.5 trunk 2.1.5 2.11 2.12 2.13 2.15 All 47 releases
← All changes | core/Category.class.php +13 -0 3.1.0 → 5.5.0 View file →
@@ -276,8 +276,21 @@
276 276 $attr[ $key ] = $atts[ $key ];
277 277 }
278 278 }
279 279
280 + // Whitelist allowed columns for ORDER BY to prevent SQL injection
281 + $allowed_order_by = array( 'ID', 'id', 'name', 'createtime', 'updatetime' );
282 +
283 + // Validate orderBy against whitelist
284 + if ( ! in_array( $attr['orderBy'], $allowed_order_by, true ) ) {
285 + $attr['orderBy'] = 'ID';
286 + }
287 +
288 + // Validate order against whitelist
289 + if ( ! in_array( strtoupper( $attr['order'] ), array( 'ASC', 'DESC' ), true ) ) {
290 + $attr['order'] = 'DESC';
291 + }
292 +
280 293 // Log the final attributes used for the query.
281 294 Logger::getInstance()->debug( 'Using the following attributes for the query.', [
282 295 'plugin' => 'double-opt-in',
283 296 'attributes' => $attr,