Skip to content

Commit 69d7011

Browse files
authored
Pods 3.2.8.2 (#7396)
2 parents 70d4b2a + d0aef21 commit 69d7011

File tree

6 files changed

+31
-5
lines changed

6 files changed

+31
-5
lines changed

changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ Found a bug? Have a great feature idea? Get on GitHub and tell us about it and w
22

33
Our GitHub has the full list of all prior releases of Pods: https://github.com/pods-framework/pods/releases
44

5+
= 3.2.8.2 - February 7th, 2025 =
6+
7+
* Security: Do not allow using custom SQL clauses for Relationship fields when SQL clauses are disabled in the Pods security settings. Props to the CleanTalk / Dmitrii Ignatyev for responsibly reporting this. (@sc0ttkclark)
8+
59
= 3.2.8.1 - November 22nd, 2024 =
610

711
* Security: Resolve stored XSS issue with the File Upload field Add Button Text option. Props to the CleanTalk / Dmitrii Ignatyev for responsibly reporting this (their second report, they are doing good work!). (@sc0ttkclark)

classes/fields/pick.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2696,14 +2696,23 @@ public function get_object_data( $object_params = null ) {
26962696
$params = array(
26972697
'select' => "`t`.`{$search_data->field_id}`, `t`.`{$search_data->field_index}`",
26982698
'table' => $search_data->table,
2699-
'where' => pods_v( static::$type . '_where', $options, (array) $table_info['where_default'], true ),
2699+
'where' => pods_v( static::$type . '_where', $options, null, true ),
27002700
'orderby' => pods_v( static::$type . '_orderby', $options, null, true ),
27012701
'having' => pods_v( static::$type . '_having', $options, null, true ),
27022702
'groupby' => pods_v( static::$type . '_groupby', $options, null, true ),
27032703
'pagination' => false,
27042704
'search' => false,
27052705
);
27062706

2707+
if ( ! pods_can_use_dynamic_feature_sql_clauses() ) {
2708+
$params['where'] = $params['where'] ? '0=1 /* Dynamic SQL clauses disabled in Pods */' : (array) $table_info['where_default'];
2709+
$params['orderby'] = null;
2710+
$params['having'] = null;
2711+
$params['groupby'] = null;
2712+
} elseif ( null === $params['where'] ) {
2713+
$params['where'] = (array) $table_info['where_default'];
2714+
}
2715+
27072716
if ( in_array( $options[ static::$type . '_object' ], array( 'site', 'network' ), true ) ) {
27082717
$params['select'] .= ', `t`.`path`';
27092718
}
@@ -2883,6 +2892,10 @@ public function get_object_data( $object_params = null ) {
28832892

28842893
$pick_orderby = pods_v( static::$type . '_orderby', $options, null, true );
28852894

2895+
if ( ! pods_can_use_dynamic_feature_sql_clauses() ) {
2896+
$pick_orderby = null;
2897+
}
2898+
28862899
if ( is_string( $pick_orderby ) && 0 < strlen( $pick_orderby ) ) {
28872900
$orderby[] = $pick_orderby;
28882901
}

classes/widgets/PodsWidgetList.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ public function widget( $args, $instance ) {
4141
'cache_mode' => trim( (string) pods_v( 'cache_mode', $instance, 'none', true ) ),
4242
);
4343

44+
if ( ! pods_can_use_dynamic_feature_sql_clauses() ) {
45+
$args['orderby'] = '';
46+
$args['where'] = $args['where'] ? '0=1 /* Dynamic SQL clauses disabled in Pods */' : '';
47+
}
48+
4449
$content = trim( (string) pods_v( 'template_custom', $instance, '' ) );
4550

4651
if ( 0 < strlen( $args['name'] ) && ( 0 < strlen( $args['template'] ) || 0 < strlen( $content ) ) ) {

init.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Plugin Name: Pods - Custom Content Types and Fields
1111
* Plugin URI: https://pods.io/
1212
* Description: Pods is a framework for creating, managing, and deploying customized content types and fields
13-
* Version: 3.2.8.1
13+
* Version: 3.2.8.2
1414
* Author: Pods Framework Team
1515
* Author URI: https://pods.io/about/
1616
* Text Domain: pods
@@ -43,7 +43,7 @@
4343
add_action( 'init', 'pods_deactivate_pods_ui' );
4444
} else {
4545
// Current version.
46-
define( 'PODS_VERSION', '3.2.8.1' );
46+
define( 'PODS_VERSION', '3.2.8.2' );
4747

4848
// Current database version, this is the last version the database changed.
4949
define( 'PODS_DB_VERSION', '2.3.5' );

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pods",
3-
"version": "3.2.8.1",
3+
"version": "3.2.8.2",
44
"description": "Pods is a development framework for creating, extending, managing, and deploying customized content types in WordPress.",
55
"author": "Pods Foundation, Inc",
66
"homepage": "https://pods.io/",

readme.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Tags: pods, custom post types, custom taxonomies, content types, custom fields
55
Requires at least: 6.0
66
Tested up to: 6.7
77
Requires PHP: 7.2
8-
Stable tag: 3.2.8.1
8+
Stable tag: 3.2.8.2
99
License: GPLv2 or later
1010
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1111

@@ -182,6 +182,10 @@ Pods really wouldn't be where it is without all the contributions from our [dono
182182

183183
== Changelog ==
184184

185+
= 3.2.8.2 - February 7th, 2025 =
186+
187+
* Security: Do not allow using custom SQL clauses for Relationship fields when SQL clauses are disabled in the Pods security settings. Props to the CleanTalk / Dmitrii Ignatyev for responsibly reporting this. (@sc0ttkclark)
188+
185189
= 3.2.8.1 - November 22nd, 2024 =
186190

187191
* Security: Resolve stored XSS issue with the File Upload field Add Button Text option. Props to the CleanTalk / Dmitrii Ignatyev for responsibly reporting this (their second report, they are doing good work!). (@sc0ttkclark)

0 commit comments

Comments
 (0)