From 93943d6cb94146bc934bc1d309431d74098b76c7 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 18 Jul 2013 14:31:25 +0000 Subject: [PATCH] XML-RPC: Recursively escape arrays as before, to avoid stomping nested objects. fixes #21767. git-svn-id: https://develop.svn.wordpress.org/trunk@24731 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-wp-xmlrpc-server.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index 28914d4058..1f6e113ac8 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -223,7 +223,9 @@ class wp_xmlrpc_server extends IXR_Server { return wp_slash( $data ); foreach ( $data as &$v ) { - if ( ! is_object( $v ) ) + if ( is_array( $v ) ) + $this->escape( $v ); + elseif ( ! is_object( $v ) ) $v = wp_slash( $v ); } }