[BUGFIX] Load XML files of t3editor properly 77/47177/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Thu, 10 Mar 2016 13:10:12 +0000 (14:10 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Thu, 10 Mar 2016 14:21:12 +0000 (15:21 +0100)
Since the XEE security fix (I26701fc2ffb5aed7ccbd96c168aef571d012091e),
the XML files in the t3editor are not loaded anymore. Change the way how
the files are loaded to fix the issue.

Change-Id: I26c622e47ee0f791b998886837f4443f5bddf11b
Resolves: #74508
Releases: master, 7.6, 6.2
Reviewed-on: https://review.typo3.org/47177
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/t3editor/Classes/TypoScriptReferenceLoader.php

index 030bacf..6e397ad 100644 (file)
@@ -75,7 +75,7 @@ class TypoScriptReferenceLoader {
                // Disables the functionality to allow external entities to be loaded when parsing the XML, must be kept
                $previousValueOfEntityLoader = libxml_disable_entity_loader(TRUE);
                $this->xmlDoc = new \DOMDocument('1.0', 'utf-8');
-               $this->xmlDoc->load($filepath);
+               $this->xmlDoc->loadXML(file_get_contents($filepath));
                libxml_disable_entity_loader($previousValueOfEntityLoader);
                // @TODO: oliver@typo3.org: I guess this is not required here
                $this->xmlDoc->saveXML();