[BUGFIX] Revert "[TASK] Use a 401 header if login is not successful" 88/27888/9
authorMichael Knabe <mk@e-netconsulting.de>
Thu, 27 Feb 2014 11:27:51 +0000 (12:27 +0100)
committerJigal van Hemert <jigal.van.hemert@typo3.org>
Thu, 27 Feb 2014 13:21:36 +0000 (14:21 +0100)
This reverts commit 9974f36d2736e21875a76d33a9dd7ceb440a100d.

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: I134f0f1d575f3e8d4c37c2af62df8eca3f01f817
Reviewed-on: https://review.typo3.org/27888
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php

index b97cc41..95058b1 100644 (file)
@@ -28,7 +28,6 @@ namespace TYPO3\CMS\Core\Authentication;
  ***************************************************************/
 
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Utility\HttpUtility;
 
 /**
  * Authentication of users in TYPO3
@@ -810,11 +809,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) {
                                GeneralUtility::devLog('Login failed: ' . GeneralUtility::arrayToLogString($loginData), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 2);