PluginProbe
wpForo Forum / 3.1.6
wpForo Forum v3.1.6
3.1.6 3.1.5 3.1.4 3.1.2 3.1.1 3.1.0 3.0.9 3.0.8 3.0.7 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 All 138 releases
← All changes | widgets/RecentPosts.php +9 -0 3.1.23.1.6 View file →
@@ -186,8 +186,17 @@
186 186
187 187 // Force permission checks — prevents check_private=false injection
188 188 $post_args['check_private'] = true;
189 189
190 + // SECURITY: Strip forumid (singular) to force use of forumids (array)
191 + // forumid bypasses access_filter() which only runs when forumid is null
192 + unset( $post_args['forumid'] );
193 +
194 + // Cap row_count to prevent resource exhaustion
195 + if( isset( $post_args['row_count'] ) ) {
196 + $post_args['row_count'] = min( 50, max( 1, intval( $post_args['row_count'] ) ) );
197 + }
198 +
190 199 // Validate 'orderby' parameter against whitelist
191 200 if( isset( $post_args['orderby'] ) ) {
192 201 if( ! key_exists( $post_args['orderby'], $this->orderby_fields ) ) {
193 202 $post_args['orderby'] = $this->default_instance['orderby'];