summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php
index 09ec5be441b..ed62494ab30 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -588,6 +588,11 @@ class OC {
}
public static function init(): void {
+ // prevent any XML processing from loading external entities
+ libxml_set_external_entity_loader(static function () {
+ return null;
+ });
+
// calculate the root directories
OC::$SERVERROOT = str_replace("\\", '/', substr(__DIR__, 0, -4));