Archived
Updates
This commit is contained in:
1 parent
70d2335bba
commit
7428b67da5
1086 files changed
+94145
-59082
No files matched your search
@@ -151,7 +151,7 @@ class IXR_Value {
|
||||
/**
|
||||
* Checks whether or not the supplied array is a struct or not
|
||||
*
|
||||
* @param unknown_type $array
|
||||
* @param array $array
|
||||
* @return boolean
|
||||
*/
|
||||
function isStruct($array)
|
||||
@@ -228,6 +228,13 @@ class IXR_Message
|
||||
// Bail if there are too many elements to parse
|
||||
$element_limit = 30000;
|
||||
if ( function_exists( 'apply_filters' ) ) {
|
||||
/**
|
||||
* Filter the number of elements to parse in an XML-RPC response.
|
||||
*
|
||||
* @since 4.0.0
|
||||
*
|
||||
* @param int $element_limit Default elements limit.
|
||||
*/
|
||||
$element_limit = apply_filters( 'xmlrpc_element_limit', $element_limit );
|
||||
}
|
||||
if ( $element_limit && 2 * $element_limit < substr_count( $this->message, '<' ) ) {
|
||||
@@ -395,7 +402,11 @@ class IXR_Server
|
||||
{
|
||||
if (!$data) {
|
||||
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] !== 'POST') {
|
||||
header('Content-Type: text/plain'); // merged from WP #9093
|
||||
if ( function_exists( 'status_header' ) ) {
|
||||
status_header( 405 ); // WP #20986
|
||||
header( 'Allow: POST' );
|
||||
}
|
||||
header('Content-Type: text/plain'); // merged from WP #9093
|
||||
die('XML-RPC server accepts POST requests only.');
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user