mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Disable external entity loading unconditionally #2556
This commit is contained in:
parent
2af43ee6a7
commit
464985b1ef
1 changed files with 8 additions and 4 deletions
|
|
@ -1120,6 +1120,14 @@ class Context
|
||||||
self::$_instance->security_check = 'DENY ALL';
|
self::$_instance->security_check = 'DENY ALL';
|
||||||
self::$_instance->security_check_detail = 'ERR_UNSAFE_ENV';
|
self::$_instance->security_check_detail = 'ERR_UNSAFE_ENV';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (PHP_VERSION_ID < 80000)
|
||||||
|
{
|
||||||
|
libxml_disable_entity_loader(true);
|
||||||
|
}
|
||||||
|
libxml_set_external_entity_loader(function($a, $b, $c) {
|
||||||
|
return null;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1261,10 +1269,6 @@ class Context
|
||||||
$GLOBALS['HTTP_RAW_POST_DATA'] = '';
|
$GLOBALS['HTTP_RAW_POST_DATA'] = '';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (PHP_VERSION_ID < 80000)
|
|
||||||
{
|
|
||||||
libxml_disable_entity_loader(true);
|
|
||||||
}
|
|
||||||
$params = Rhymix\Framework\Parsers\XMLRPCParser::parse($GLOBALS['HTTP_RAW_POST_DATA']) ?: [];
|
$params = Rhymix\Framework\Parsers\XMLRPCParser::parse($GLOBALS['HTTP_RAW_POST_DATA']) ?: [];
|
||||||
}
|
}
|
||||||
elseif($request_method === 'JSON')
|
elseif($request_method === 'JSON')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue