[BUGFIX] Make openid login working again 63/38863/4
authorMarkus Klein <klein.t3@reelworx.at>
Wed, 22 Apr 2015 19:24:22 +0000 (21:24 +0200)
committerMarkus Klein <klein.t3@reelworx.at>
Thu, 23 Apr 2015 12:22:54 +0000 (14:22 +0200)
This reverts commit c6f16016a8ac5fcfe6df47015151e141a681e0c3.

Resolves: #66399
Releases: master
Change-Id: If884c5a6cb0849605e1e7706358ed7e8471f73d0
Reviewed-on: http://review.typo3.org/38863
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Christian Weiske <christian.weiske@netresearch.de>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/compatibility6/Migrations/Code/ClassAliasMap.php
typo3/sysext/compatibility6/Migrations/Code/LegacyClassesForIde.php
typo3/sysext/openid/Classes/OpenidReturn.php [deleted file]
typo3/sysext/openid/Classes/OpenidService.php
typo3/sysext/openid/Modules/OpenidReturn/conf.php [deleted file]
typo3/sysext/openid/Modules/OpenidReturn/index.php [deleted file]
typo3/sysext/openid/class.tx_openid_return.php
typo3/sysext/openid/ext_tables.php

index b2a8854..9a3fa14 100644 (file)
@@ -1080,7 +1080,6 @@ return array(
        'SC_mod_tools_dbint_index' => \TYPO3\CMS\Lowlevel\View\DatabaseIntegrityView::class,
        'tx_openid_eID' => \TYPO3\CMS\Openid\OpenidEid::class,
        'tx_openid_mod_setup' => \TYPO3\CMS\Openid\OpenidModuleSetup::class,
-       'tx_openid_return' => \TYPO3\CMS\Openid\OpenidReturn::class,
        'tx_openid_sv1' => \TYPO3\CMS\Openid\OpenidService::class,
        'tx_openid_store' => \TYPO3\CMS\Openid\OpenidStore::class,
        'SC_mod_web_perm_ajax' => \TYPO3\CMS\Beuser\Controller\PermissionAjaxController::class,
index 9cfe6c8..c4e53ca 100644 (file)
@@ -5369,11 +5369,6 @@ class tx_openid_mod_setup extends \TYPO3\CMS\Openid\OpenidModuleSetup {}
 /**
  * @deprecated since 6.0, removed since 7.0
  */
-class tx_openid_return extends \TYPO3\CMS\Openid\OpenidReturn {}
-
-/**
- * @deprecated since 6.0, removed since 7.0
- */
 class tx_openid_sv1 extends \TYPO3\CMS\Openid\OpenidService {}
 
 /**
diff --git a/typo3/sysext/openid/Classes/OpenidReturn.php b/typo3/sysext/openid/Classes/OpenidReturn.php
deleted file mode 100644 (file)
index b495595..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-namespace TYPO3\CMS\Openid;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Utility\HttpUtility;
-
-/**
- * This class is the OpenID return script for the TYPO3 Backend.
- *
- * @author Dmitry Dulepov <dmitry@typo3.org>
- */
-class OpenidReturn {
-
-       /**
-        * Processed Backend session creation and redirect to backend.php
-        *
-        * @return void
-        */
-       public function main() {
-               /** @var BackendUserAuthentication $beUser */
-               $beUser = $GLOBALS['BE_USER'];
-               if ($beUser->user['uid']) {
-                       GeneralUtility::cleanOutputBuffers();
-                       $backendURL = GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . 'backend.php';
-                       HttpUtility::redirect($backendURL);
-               }
-       }
-
-}
index 4fb7e9a..e1edfe2 100644 (file)
@@ -14,7 +14,6 @@ namespace TYPO3\CMS\Openid;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Database\DatabaseConnection;
 use TYPO3\CMS\Core\Service\AbstractService;
 use TYPO3\CMS\Core\TimeTracker\TimeTracker;
@@ -419,7 +418,7 @@ class OpenidService extends AbstractService {
                        // It is much easier for the Backend to manage users.
                        // Notice: 'login_status' parameter name cannot be changed!
                        // It is essential for BE user authentication.
-                       $returnURL = BackendUtility::getModuleUrl('openid_return', array('login_status' => 'login'));
+                       $returnURL = GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . 'sysext/' . $this->extKey . '/class.tx_openid_return.php?login_status=login';
                }
                if (GeneralUtility::_GP('tx_openid_mode') === 'finish') {
                        $requestURL = GeneralUtility::_GP('tx_openid_location');
diff --git a/typo3/sysext/openid/Modules/OpenidReturn/conf.php b/typo3/sysext/openid/Modules/OpenidReturn/conf.php
deleted file mode 100644 (file)
index 1b5602c..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-// Required for mod.php
-$MCONF['name'] = 'openid_return';
-$MCONF['script'] = '_DISPATCH';
\ No newline at end of file
diff --git a/typo3/sysext/openid/Modules/OpenidReturn/index.php b/typo3/sysext/openid/Modules/OpenidReturn/index.php
deleted file mode 100644 (file)
index 95a6d0a..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-// Fix _GET/_POST values for authentication
-if (isset($_GET['login_status'])) {
-       $_POST['login_status'] = $_GET['login_status'];
-}
-
-/** @var \TYPO3\CMS\Openid\OpenidReturn $module */
-$module = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Openid\OpenidReturn::class);
-$module->main();
index e371581..d544490 100644 (file)
  *
  * The TYPO3 project - inspiring people to share!
  */
-// Fix _GET/_POST values for authentication
+
+// Fix _GET/_POST values for authentication (login_status has to be submitted via POST for BE auth)
 if (isset($_GET['login_status'])) {
        $_POST['login_status'] = $_GET['login_status'];
 }
+
 define('TYPO3_MOD_PATH', 'sysext/openid/');
 require_once '../../init.php';
-\TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
-       'The entry point to the openid return window was moved to an own module. Please use BackendUtility::getModuleUrl(\'openid_return\') to link to class.tx_openid_return.php. This script will be removed in TYPO3 CMS 8.'
-);
-/* @var \TYPO3\CMS\Openid\OpenidReturn $module */
-$module = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Openid\OpenidReturn::class);
-$module->main();
+
+/** @var \TYPO3\CMS\Core\Authentication\BackendUserAuthentication $beUser */
+$beUser = $GLOBALS['BE_USER'];
+if ($beUser->user['uid']) {
+       \TYPO3\CMS\Core\Utility\GeneralUtility::cleanOutputBuffers();
+       $backendURL = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . 'backend.php';
+       \TYPO3\CMS\Core\Utility\HttpUtility::redirect($backendURL);
+}
index 77b6bf8..3ea1f45 100644 (file)
@@ -8,12 +8,6 @@ if (TYPO3_MODE === 'BE') {
                \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'wizard/'
        );
 
-       // Register openid return module
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
-               'openid_return',
-               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/OpenidReturn/'
-       );
-
        // Add field to setup module
        $GLOBALS['TYPO3_USER_SETTINGS']['columns']['tx_openid_openid'] = array(
                'type' => 'user',