mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Make simplexml_load_file work on shared php-fpm
PHP #62577 [1] together with PHP #64938 [2] make simplexml_load_file() fails when the "disable load external entities" flag is set. As a workaround, manually enable the entity loader in the bootstrap code. We are loading internal XML files after all, so no security implications should arise. [1] https://bugs.php.net/bug.php?id=62577 [2] https://bugs.php.net/bug.php?id=64938 Fix #6174.
This commit is contained in:
parent
2a3768266e
commit
fe816076fc
3
main.php
3
main.php
@ -62,6 +62,9 @@ if(!empty($_SERVER['HTTP_X_ORIGINAL_URL'])) {
|
|||||||
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];
|
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Enable the entity loader to be able to load XML in Zend_Locale_Data
|
||||||
|
libxml_disable_entity_loader(false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Figure out the request URL
|
* Figure out the request URL
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user