[BUGFIX] Revert "[TASK] Use a 401 header if login is not successful" 98/27898/2
authorMarkus Klein <klein.t3@mfc-linz.at>
Thu, 27 Feb 2014 13:29:09 +0000 (14:29 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Thu, 27 Feb 2014 13:42:31 +0000 (14:42 +0100)
This reverts commit b0c54dcadfba635d44242ce3778bbf8486e9b33e.

The 401 header code is used with HTTP based authentication schemes,
based on RFC 2617.

This is not the case here.

Resolves: #55966
Reverts: #51803
Releases: 6.2, 6.1, 6.0, 4.5
Change-Id: I81e0e2bb428a9da69155fc597933bd9f023cf226
Reviewed-on: https://review.typo3.org/27898
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php

index 2780492..a7522de 100644 (file)
@@ -27,8 +27,6 @@ namespace TYPO3\CMS\Core\Authentication;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
-use TYPO3\CMS\Core\Utility\HttpUtility;
-
 /**
  * Authentication of users in TYPO3
  *
@@ -803,11 +801,10 @@ abstract class AbstractUserAuthentication {
                                                // strip port from server
                                                $server = str_replace($sslPortSuffix, '', $server);
                                        }
-                                       HttpUtility::redirect('http://' . $server . '/' . $address . TYPO3_mainDir . $backendScript);
+                                       \TYPO3\CMS\Core\Utility\HttpUtility::redirect('http://' . $server . '/' . $address . TYPO3_mainDir . $backendScript);
                                }
                        }
                } elseif ($activeLogin || count($tempuserArr)) {
-                       HttpUtility::setResponseCode(HttpUtility::HTTP_STATUS_401);
                        $this->loginFailure = TRUE;
                        if ($this->writeDevLog && !count($tempuserArr) && $activeLogin) {
                                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Login failed: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::arrayToLogString($loginData), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 2);