PluginProbe
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts / trunk
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts vtrunk
2.7.7 2.7.6 2.7.5 2.7.4 trunk 1.3 2.0.4 2.0.6 2.1.91 2.2.4 2.2.7 2.2.9 2.3.1 2.3.10 2.4.10 2.4.2 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.6.0 2.6.1 2.7.0 All 28 releases
← All changes | admin/includes/class.common.snippet.php +3 -7 2.7.0trunk View file →
@@ -135,12 +135,10 @@
135 135 $post_id = null;
136 136
137 137 if ( ! empty( $post ) && is_object( $post ) && isset( $post->ID ) ) {
138 138 $post_id = $post->ID;
139 - } elseif ( ! empty( $_GET['post'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
140 - $post_id = absint( $_GET['post'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
141 139 } else {
142 - $post_id = WINP_HTTP::get( 'post', null );
140 + $post_id = WINP_HTTP::get( 'post', null, 'absint' );
143 141 }
144 142
145 143 $type = WINP_Helper::get_snippet_type( $post_id );
146 144
@@ -196,12 +194,10 @@
196 194 $post_id = null;
197 195
198 196 if ( ! empty( $post ) && is_object( $post ) && isset( $post->ID ) ) {
199 197 $post_id = $post->ID;
200 - } elseif ( ! empty( $_GET['post'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
201 - $post_id = absint( $_GET['post'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
202 198 } else {
203 - $post_id = WINP_HTTP::get( 'post', null );
199 + $post_id = WINP_HTTP::get( 'post', null, 'absint' );
204 200 }
205 201
206 202 if ( ! empty( $post_id ) ) {
207 203 $type = WINP_Helper::get_snippet_type( $post_id );
@@ -886,5 +882,5 @@
886 882 }
887 883
888 884 return $src;
889 885 }
890 -}
886 +}