From 6f00a2c1cce7ee7e38c2ae05455ed7b5e974f517 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 28 Jan 2013 04:17:05 +0000 Subject: [PATCH] Sanitize post_author and comment_count as integer fields. props GeertDD. fixes #22324. git-svn-id: http://core.svn.wordpress.org/trunk@23353 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 959591aaa3..a9c2acb4d6 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1989,7 +1989,7 @@ function sanitize_post($post, $context = 'display') { * @return mixed Sanitized value. */ function sanitize_post_field($field, $value, $post_id, $context) { - $int_fields = array('ID', 'post_parent', 'menu_order'); + $int_fields = array('ID', 'post_parent', 'menu_order', 'post_author', 'comment_count'); if ( in_array($field, $int_fields) ) $value = (int) $value;