[BUGFIX] Fix path-resolution for template-resource in EXT:felogin 25/54625/2
authorDaniel Siepmann <noreply@example.com>
Sun, 12 Nov 2017 13:50:40 +0000 (14:50 +0100)
committerAndreas Fernandez <typo3@scripting-base.de>
Mon, 13 Nov 2017 08:28:01 +0000 (09:28 +0100)
Do not use frontend inclusion API for private template resource.
Instead resolve to full absolute path for inclusion.

Releases: master, 8.7
Resolves: #82978
Resolves: #82979
Change-Id: Iadd3a8386b967aeb8b5ffdb28baeb73c2a0f2734
Reviewed-on: https://review.typo3.org/54625
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php

index 6792f11..1b434fe 100644 (file)
@@ -142,8 +142,8 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
         $this->redirectUrl = $this->validateRedirectUrl($this->redirectUrl);
         // Get Template
         $templateFile = $this->conf['templateFile'] ?: 'EXT:felogin/Resources/Private/Templates/FrontendLogin.html';
-        $template = $this->getTypoScriptFrontendController()->tmpl->getFileName($templateFile);
-        if ($template !== null && file_exists($template)) {
+        $template = GeneralUtility::getFileAbsFileName($templateFile);
+        if ($template !== '' && file_exists($template)) {
             $this->template = file_get_contents($template);
         }
         // Is user logged in?