[BUGFIX] Revert "[TASK] Use a 401 header if login is not successful"
[Packages/TYPO3.CMS.git] / 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);