[BUGFIX] Fix path-resolution for template-resource in EXT:felogin 22/54622/4
authorDaniel Siepmann <noreply@example.com>
Sun, 12 Nov 2017 13:50:40 +0000 (14:50 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Mon, 13 Nov 2017 08:06:55 +0000 (09:06 +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/54622
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php

index 1b1ee91..3112b44 100644 (file)
@@ -147,8 +147,8 @@ class FrontendLoginController extends AbstractPlugin implements LoggerAwareInter
         $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?