diff --git a/composer.json b/composer.json index fef28b10dc5a18ca448228c13b043eec9a37f1c0..3f30a15a52c86c6d9b26117e20d7bc1b8bbd8dad 100644 --- a/composer.json +++ b/composer.json @@ -200,8 +200,6 @@ "TYPO3\\CMS\\Impexp\\Tests\\": "typo3/sysext/impexp/Tests/", "TYPO3\\CMS\\IndexedSearch\\Tests\\": "typo3/sysext/indexed_search/Tests/", "TYPO3\\CMS\\Install\\Tests\\": "typo3/sysext/install/Tests/", - "FoT3\\Jumpurl\\": "typo3/sysext/jumpurl/Classes/", - "FoT3\\Jumpurl\\Tests\\": "typo3/sysext/jumpurl/Tests/", "TYPO3\\CMS\\Lang\\Tests\\": "typo3/sysext/lang/Tests/", "TYPO3\\CMS\\Lowlevel\\Tests\\": "typo3/sysext/lowlevel/Tests/", "TYPO3\\CMS\\Recordlist\\Tests\\": "typo3/sysext/recordlist/Tests/", diff --git a/composer.lock b/composer.lock index 60f77aa0a6e12b57837f1bd6fefbe44c9575d52f..56710a5652f0059c0757544074142b1f1200e8f4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "86c884e10a0b730855e327edfd19fd02", + "hash": "bca7240d8b2c86b9165c3efef17ffeb5", "content-hash": "2988051bfeacaa2d95da8d796d9c5bd8", "packages": [ { diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-70578-JumpURLFunctionalityRemovedFromTheTYPO3Core.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-70578-JumpURLFunctionalityRemovedFromTheTYPO3Core.rst new file mode 100644 index 0000000000000000000000000000000000000000..2ef3ec716d27912a45a7bdad144624ed477d584a --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-70578-JumpURLFunctionalityRemovedFromTheTYPO3Core.rst @@ -0,0 +1,29 @@ +==================================================================== +Breaking: #70578 - JumpURL functionality removed from the TYPO3 Core +==================================================================== + +Description +=========== + +The handling and generation of so-called Jump URLs has been moved into its own extension called "jumpurl" +and is now available in the TYPO3 Extension Repository (TER), and available via composer as the package name +"friendsoftypo3/jumpurl". + + +Impact +====== + +If the functionality was used in an installation before (e.g. with Direct Mail or via TypoScript), this functionality is +not working anymore. + + +Affected Installations +====================== + +All installations where Jump URLs were used. + + +Migration +========= + +Download and install the extension "jumpurl" from the TER. \ No newline at end of file diff --git a/typo3/sysext/jumpurl/Classes/JumpUrlHandler.php b/typo3/sysext/jumpurl/Classes/JumpUrlHandler.php deleted file mode 100644 index e3a78c97c69c9a4e1c65957bcf47309b1809421d..0000000000000000000000000000000000000000 --- a/typo3/sysext/jumpurl/Classes/JumpUrlHandler.php +++ /dev/null @@ -1,346 +0,0 @@ -<?php -namespace FoT3\Jumpurl; - -/* - * 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\Resource\FileInterface; -use TYPO3\CMS\Core\Resource\ResourceFactory; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Core\Utility\HttpUtility; -use TYPO3\CMS\Frontend\Http\UrlHandlerInterface; - -/** - * This class implements the hooks for the JumpURL functionality when accessing a page - * which has a GET parameter "jumpurl". - * It then validates the referrer - */ -class JumpUrlHandler implements UrlHandlerInterface -{ - /** - * @var string The current JumpURL value submitted in the GET parameters. - */ - protected $url; - - /** - * Return TRUE if this hook handles the current URL. - * Warning! If TRUE is returned content rendering will be disabled! - * This method will be called in the constructor of the TypoScriptFrontendController - * - * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::__construct() - * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::initializeCustomUrlHandlers() - * @return bool - */ - public function canHandleCurrentUrl() - { - $this->url = (string)GeneralUtility::_GP('jumpurl'); - return ($this->url !== ''); - } - - /** - * Custom processing of the current URL. - * - * If a valid hash was submitted the user will either be redirected - * to the given jumpUrl or if it is a secure jumpUrl the file data - * will be passed to the user. - * - * If canHandle() has returned TRUE this method needs to take care of redirecting the user or generating custom output. - * This hook will be called BEFORE the user is redirected to an external URL configured in the page properties. - * - * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::processCustomUrlHandlers() - * @throws \RuntimeException if Jump URL was triggered by an illegal referrer. - * @return void - */ - public function handle() - { - if (!$this->referrerIsValid()) { - throw new \RuntimeException('The jumpUrl request was triggered by an illegal referrer.'); - } - - if ((bool)GeneralUtility::_GP('juSecure')) { - $this->forwardJumpUrlSecureFileData($this->url); - } else { - $this->redirectToJumpUrl($this->url); - } - } - - /** - * Returns TRUE if the current referrer allows Jump URL handling. - * This is the case then the referrer check is disabled or when the referrer matches the current TYPO3 host. - * - * @return bool if the referer is valid. - */ - protected function referrerIsValid() - { - if (!empty($GLOBALS['TYPO3_CONF_VARS']['SYS']['doNotCheckReferer'])) { - return true; - } - - $referrer = parse_url(GeneralUtility::getIndpEnv('HTTP_REFERER')); - // everything is fine if no host is set, or the host matches the TYPO3_HOST - return (!isset($referrer['host']) || $referrer['host'] === GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY')); - } - - - /** - * Redirects the user to the given jump URL if all submitted values - * are valid - * - * @param string $jumpUrl The URL to which the user should be redirected - * @throws \Exception - */ - protected function redirectToJumpUrl($jumpUrl) - { - $this->validateIfJumpUrlRedirectIsAllowed($jumpUrl); - - $pageTSconfig = $this->getTypoScriptFrontendController()->getPagesTSconfig(); - if (is_array($pageTSconfig['TSFE.'])) { - $pageTSconfig = $pageTSconfig['TSFE.']; - } else { - $pageTSconfig = array(); - } - - $jumpUrl = $this->addParametersToTransferSession($jumpUrl, $pageTSconfig); - $statusCode = $this->getRedirectStatusCode($pageTSconfig); - $this->redirect($jumpUrl, $statusCode); - } - - /** - * If the submitted hash is correct and the user has access to the - * related content element the contents of the submitted file will - * be output to the user. - * - * @param string $jumpUrl The URL to the file that should be output to the user - * @throws \Exception - */ - protected function forwardJumpUrlSecureFileData($jumpUrl) - { - // Set the parameters required for handling a secure jumpUrl link - // The locationData GET parameter, containing information about the record that created the URL - $locationData = (string)GeneralUtility::_GP('locationData'); - // The optional mimeType GET parameter - $mimeType = (string)GeneralUtility::_GP('mimeType'); - // The jump Url Hash GET parameter - $juHash = (string)GeneralUtility::_GP('juHash'); - - // validate the hash GET parameter against the other parameters - if ($juHash !== JumpUrlUtility::calculateHashSecure($jumpUrl, $locationData, $mimeType)) { - throw new \Exception('The calculated Jump URL secure hash ("juHash") did not match the submitted "juHash" query parameter.', 1294585196); - } - - if (!$this->isLocationDataValid($locationData)) { - throw new \Exception('The calculated secure location data "' . $locationData . '" is not accessible.', 1294585195); - } - - // Allow spaces / special chars in filenames. - $jumpUrl = rawurldecode($jumpUrl); - - // Deny access to files that match TYPO3_CONF_VARS[SYS][fileDenyPattern] and whose parent directory - // is typo3conf/ (there could be a backup file in typo3conf/ which does not match against the fileDenyPattern) - $absoluteFileName = GeneralUtility::getFileAbsFileName(GeneralUtility::resolveBackPath($jumpUrl), false); - - if ( - !GeneralUtility::isAllowedAbsPath($absoluteFileName) - || !GeneralUtility::verifyFilenameAgainstDenyPattern($absoluteFileName) - || GeneralUtility::isFirstPartOfStr($absoluteFileName, (PATH_site . 'typo3conf')) - ) { - throw new \Exception('The requested file was not allowed to be accessed through Jump URL. The path or file is not allowed.', 1294585194); - } - - try { - $resourceFactory = $this->getResourceFactory(); - $file = $resourceFactory->retrieveFileOrFolderObject($absoluteFileName); - $this->readFileAndExit($file, $mimeType); - } catch (\Exception $e) { - throw new \Exception('The requested file "' . $jumpUrl . '" for Jump URL was not found..', 1294585193); - } - } - - /** - * Checks if the given location data is valid and the connected record is accessible by the current user. - * - * @param string $locationData - * @return bool - */ - protected function isLocationDataValid($locationData) - { - $isValidLocationData = false; - list($pageUid, $table, $recordUid) = explode(':', $locationData); - $pageRepository = $this->getTypoScriptFrontendController()->sys_page; - $timeTracker = $this->getTimeTracker(); - if (empty($table) || $pageRepository->checkRecord($table, $recordUid, true)) { - // This check means that a record is checked only if the locationData has a value for a - // record else than the page. - if (!empty($pageRepository->getPage($pageUid))) { - $isValidLocationData = true; - } else { - $timeTracker->setTSlogMessage('LocationData Error: The page pointed to by location data "' . $locationData . '" was not accessible.', 2); - } - } else { - $timeTracker->setTSlogMessage('LocationData Error: Location data "' . $locationData . '" record pointed to was not accessible.', 2); - } - return $isValidLocationData; - } - - /** - * This implements a hook, e.g. for direct mail to allow the redirects but only if the handler says it's alright - * But also checks against the common juHash parameter first - * - * @param string $jumpUrl the URL to check - * @throws \Exception thrown if no redirect is allowed - */ - protected function validateIfJumpUrlRedirectIsAllowed($jumpUrl) - { - $allowRedirect = false; - if ($this->isJumpUrlHashValid($jumpUrl)) { - $allowRedirect = true; - } elseif ( - isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['jumpurlRedirectHandler']) - && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['jumpurlRedirectHandler']) - ) { - foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['jumpurlRedirectHandler'] as $className) { - $hookObject = GeneralUtility::getUserObj($className); - if (method_exists($hookObject, 'jumpurlRedirectHandler')) { - $allowRedirect = $hookObject->jumpurlRedirectHandler($jumpUrl, $GLOBALS['TSFE']); - } - if ($allowRedirect) { - break; - } - } - } - - if (!$allowRedirect) { - throw new \Exception('The calculated Jump URL hash ("juHash") did not match the submitted "juHash" query parameter.', 1359987599); - } - } - - /** - * Validate the jumpUrl hash against the GET/POST parameter "juHash". - * - * @param string $jumpUrl The URL to check against. - * @return bool - */ - protected function isJumpUrlHashValid($jumpUrl) - { - return GeneralUtility::_GP('juHash') === JumpUrlUtility::calculateHash($jumpUrl); - } - - /** - * Calls the PHP readfile function and exits. - * - * @param FileInterface $file The file that should be read. - * @param string $mimeType Optional mime type override. If empty the automatically detected mime type will be used. - */ - protected function readFileAndExit($file, $mimeType) - { - $file->getStorage()->dumpFileContents($file, true, null, $mimeType); - exit; - } - - /** - * Simply calls the redirect method in the HttpUtility. - * - * @param string $jumpUrl - * @param int $statusCode - */ - protected function redirect($jumpUrl, $statusCode) - { - HttpUtility::redirect($jumpUrl, $statusCode); - } - - /** - * Modified the URL to go to by adding the session key information to it - * but only if TSFE.jumpUrl_transferSession = 1 is set via pageTSconfig. - * - * @param string $jumpUrl the URL to go to - * @param array $pageTSconfig the TSFE. part of the TS configuration - * - * @return string the modified URL - */ - protected function addParametersToTransferSession($jumpUrl, $pageTSconfig) - { - // allow to send the current fe_user with the jump URL - if (!empty($pageTSconfig['jumpUrl_transferSession'])) { - $uParts = parse_url($jumpUrl); - /** @noinspection PhpInternalEntityUsedInspection We need access to the current frontend user ID. */ - $params = '&FE_SESSION_KEY=' . - rawurlencode( - $this->getTypoScriptFrontendController()->fe_user->id . '-' . - md5( - $this->getTypoScriptFrontendController()->fe_user->id . '/' . - $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] - ) - ); - // Add the session parameter ... - $jumpUrl .= ($uParts['query'] ? '' : '?') . $params; - } - return $jumpUrl; - } - - /** - * Returns one of the HTTP_STATUS_* constants of the HttpUtility that matches - * the configured HTTP status code in TSFE.jumpURL_HTTPStatusCode Page TSconfig. - * - * @param array $pageTSconfig - * @return string - * @throws \InvalidArgumentException If the configured status code is not valid. - */ - protected function getRedirectStatusCode($pageTSconfig) - { - $statusCode = HttpUtility::HTTP_STATUS_303; - - if (!empty($pageTSconfig['jumpURL_HTTPStatusCode'])) { - switch ((int)$pageTSconfig['jumpURL_HTTPStatusCode']) { - case 301: - $statusCode = HttpUtility::HTTP_STATUS_301; - break; - case 302: - $statusCode = HttpUtility::HTTP_STATUS_302; - break; - case 307: - $statusCode = HttpUtility::HTTP_STATUS_307; - break; - default: - throw new \InvalidArgumentException('The configured jumpURL_HTTPStatusCode option is invalid. Allowed codes are 301, 302 and 307.', 1381768833); - } - } - - return $statusCode; - } - - /** - * @return \TYPO3\CMS\Core\TimeTracker\TimeTracker - */ - protected function getTimeTracker() - { - return $GLOBALS['TT']; - } - - /** - * Returns an instance of the ResourceFactory. - * - * @return ResourceFactory - */ - protected function getResourceFactory() - { - return ResourceFactory::getInstance(); - } - - /** - * @return \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController - */ - protected function getTypoScriptFrontendController() - { - return $GLOBALS['TSFE']; - } -} diff --git a/typo3/sysext/jumpurl/Classes/JumpUrlProcessor.php b/typo3/sysext/jumpurl/Classes/JumpUrlProcessor.php deleted file mode 100644 index fa3df5a885f13998820055751b267fe483385ed7..0000000000000000000000000000000000000000 --- a/typo3/sysext/jumpurl/Classes/JumpUrlProcessor.php +++ /dev/null @@ -1,211 +0,0 @@ -<?php -namespace FoT3\Jumpurl; - -/* - * 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\Utility\GeneralUtility; -use TYPO3\CMS\Core\Utility\StringUtility; -use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; -use TYPO3\CMS\Frontend\Http\UrlProcessorInterface; - -/** - * This class implements the hooks for creating jump URLs when links (typolink, mailtoLink) are built - */ -class JumpUrlProcessor implements UrlProcessorInterface -{ - /** - * @var ContentObjectRenderer - */ - protected $contentObjectRenderer; - - /** - * Generates the JumpURL for the given parameters. - * - * @see \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::processUrlModifiers() - * @param string $context The context in which the URL is generated (e.g. "typolink"). - * @param string $url The URL that should be processed. - * @param array $configuration The link configuration. - * @param \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObjectRenderer The calling content object renderer. - * @param bool $keepProcessing If this is set to FALSE no further hooks will be processed after the current one. - * @return string - */ - public function process($context, $url, array $configuration, ContentObjectRenderer $contentObjectRenderer, &$keepProcessing) - { - if (!$this->isEnabled($context, $configuration)) { - return $url; - } - - $this->contentObjectRenderer = $contentObjectRenderer; - - // Strip the absRefPrefix from the URLs. - $urlPrefix = (string)$this->getTypoScriptFrontendController()->absRefPrefix; - if ($urlPrefix !== '' && StringUtility::beginsWith($url, $urlPrefix)) { - $url = substr($url, strlen($urlPrefix)); - } - - // Make sure the slashes in the file URL are not encoded. - if ($context === UrlProcessorInterface::CONTEXT_FILE) { - $url = str_replace('%2F', '/', rawurlencode(rawurldecode($url))); - } - - $url = $this->build($url, isset($configuration['jumpurl.']) ? $configuration['jumpurl.'] : array()); - - // Now add the prefix again if it was not added by a typolink call already. - if ($urlPrefix !== '' && !StringUtility::beginsWith($url, $urlPrefix)) { - $url = $urlPrefix . $url; - } - - return $url; - } - - /** - * Returns TRUE if jumpurl was enabled in the global configuration - * or in the given configuration - * - * @param string $context separate check for the MAIL context needed - * @param array $configuration Optional jump URL configuration - * @return bool TRUE if enabled, FALSE if disabled - */ - protected function isEnabled($context, array $configuration = array()) - { - if (!empty($configuration['jumpurl.']['forceDisable'])) { - return false; - } - - $enabled = !empty($configuration['jumpurl']); - - // if jumpurl is explicitly set to 0 we override the global configuration - if (!$enabled && $this->getTypoScriptFrontendController()->config['config']['jumpurl_enable']) { - $enabled = !isset($configuration['jumpurl']) || $configuration['jumpurl']; - } - - // If we have a mailto link and jumpurl is not explicitly enabled - // but globally disabled for mailto links we disable it - if ( - empty($configuration['jumpurl']) && $context === UrlProcessorInterface::CONTEXT_MAIL - && $this->getTypoScriptFrontendController()->config['config']['jumpurl_mailto_disable'] - ) { - $enabled = false; - } - - return $enabled; - } - - - /** - * Builds a jump URL for the given URL - * - * @param string $url The URL to which will be jumped - * @param array $configuration Optional TypoLink configuration - * @return string The generated URL - */ - protected function build($url, array $configuration) - { - $urlParameters = array('jumpurl' => $url); - - // see if a secure File URL should be built - if (!empty($configuration['secure'])) { - $secureParameters = $this->getParametersForSecureFile( - $url, - isset($configuration['secure.']) ? $configuration['secure.'] : array() - ); - $urlParameters = array_merge($urlParameters, $secureParameters); - } else { - $urlParameters['juHash'] = JumpUrlUtility::calculateHash($url); - } - - $typoLinkConfiguration = array( - 'parameter' => $this->getTypoLinkParameter($configuration), - 'additionalParams' => GeneralUtility::implodeArrayForUrl('', $urlParameters), - // make sure jump URL is not called again - 'jumpurl.' => array('forceDisable' => '1') - ); - - return $this->getContentObjectRenderer()->typoLink_URL($typoLinkConfiguration); - } - - /** - * Returns a URL parameter array containing parameters for secure downloads by "jumpurl". - * Helper function for filelink() - * - * The array returned has the following structure: - * juSecure => is always 1, - * locationData => information about the record that created the jumpUrl, - * juHash => the hash that will be checked before the file is downloadable - * [mimeType => the mime type of the file] - * - * @param string $jumpUrl The URL to jump to, basically the filepath - * @param array $configuration TypoScript properties for the "jumpurl.secure" property of "filelink" - * @return array URL parameters required for jumpUrl secure - * - */ - protected function getParametersForSecureFile($jumpUrl, array $configuration) - { - $parameters = array( - 'juSecure' => 1, - 'locationData' => $this->getTypoScriptFrontendController()->id . ':' . $this->getContentObjectRenderer()->currentRecord - ); - - $pathInfo = pathinfo($jumpUrl); - if (!empty($pathInfo['extension'])) { - $mimeTypes = GeneralUtility::trimExplode(',', $configuration['mimeTypes'], true); - foreach ($mimeTypes as $mimeType) { - list($fileExtension, $mimeType) = GeneralUtility::trimExplode('=', $mimeType, false, 2); - if (strtolower($pathInfo['extension']) === strtolower($fileExtension)) { - $parameters['mimeType'] = $mimeType; - break; - } - } - } - $parameters['juHash'] = JumpUrlUtility::calculateHashSecure($jumpUrl, $parameters['locationData'], $parameters['mimeType']); - return $parameters; - } - - /** - * Checks if an alternative link parameter was configured and if not - * a default parameter will be generated based on the current page - * ID and type. - * When linking to a file this method is needed - * - * @param array $configuration Data from the TypoLink jumpurl configuration - * @return string The parameter for the jump URL TypoLink - */ - protected function getTypoLinkParameter(array $configuration) - { - $linkParameter = $this->getContentObjectRenderer()->stdWrapValue('parameter', $configuration); - - if (empty($linkParameter)) { - $frontendController = $this->getTypoScriptFrontendController(); - $linkParameter = $frontendController->id . ',' . $frontendController->type; - } - - return $linkParameter; - } - - /** - * @return \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController - */ - protected function getTypoScriptFrontendController() - { - return $GLOBALS['TSFE']; - } - - /** - * @return ContentObjectRenderer - */ - protected function getContentObjectRenderer() - { - return $this->contentObjectRenderer ?: $this->getTypoScriptFrontendController()->cObj; - } -} diff --git a/typo3/sysext/jumpurl/Classes/JumpUrlUtility.php b/typo3/sysext/jumpurl/Classes/JumpUrlUtility.php deleted file mode 100644 index 7ffe60627ef254b4d30d941eda5c514b51847d03..0000000000000000000000000000000000000000 --- a/typo3/sysext/jumpurl/Classes/JumpUrlUtility.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php -namespace FoT3\Jumpurl; - -/* - * 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\Utility\GeneralUtility; - -/** - * This class contains functions for generating and validating jump URLs - */ -class JumpUrlUtility -{ - /** - * Calculates the hash for the given jump URL - * - * @param string $jumpUrl The target URL - * @return string The calculated hash - */ - public static function calculateHash($jumpUrl) - { - return GeneralUtility::hmac($jumpUrl, 'jumpurl'); - } - - /** - * Calculates the hash for the given jump URL secure data. - * - * @param string $jumpUrl The URL to the file - * @param string $locationData Information about the record that rendered the jump URL, format is [pid]:[table]:[uid] - * @param string $mimeType Mime type of the file or an empty string - * @return string The calculated hash - */ - public static function calculateHashSecure($jumpUrl, $locationData, $mimeType) - { - $data = array((string)$jumpUrl, (string)$locationData, (string)$mimeType); - return GeneralUtility::hmac(serialize($data)); - } -} diff --git a/typo3/sysext/jumpurl/Documentation/.gitignore b/typo3/sysext/jumpurl/Documentation/.gitignore deleted file mode 100644 index 6cd159f2dad9a4583183510425d81e948207903b..0000000000000000000000000000000000000000 --- a/typo3/sysext/jumpurl/Documentation/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# this is file .gitignore - -# ignore everything in this directory -_make/* - -# but do not ignore this file -!_not_versioned/.gitignore diff --git a/typo3/sysext/jumpurl/Documentation/Configuration/Index.rst b/typo3/sysext/jumpurl/Documentation/Configuration/Index.rst deleted file mode 100644 index 5e817a3f107079f22c2d4fef6550699818fd2550..0000000000000000000000000000000000000000 --- a/typo3/sysext/jumpurl/Documentation/Configuration/Index.rst +++ /dev/null @@ -1,208 +0,0 @@ -.. ================================================== -.. FOR YOUR INFORMATION -.. -------------------------------------------------- -.. -*- coding: utf-8 -*- with BOM. - -.. include:: ../Includes.txt - - -.. _configuration: - -Configuration -------------- - -This Extension is configured by global :ref:`TypoScript config <configuration-global>`, -:ref:`typolink options <configuration-global-jumpurl-enable>` and -:ref:`configuration-typo3-conf-vars`. - - -.. _configuration-global: - -Global TypoScript configuration -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -JumpURL can be configured globally in the ``config`` TypoScript namespace. - - -.. ### BEGIN~OF~TABLE ### - - -.. _configuration-global-jumpurl-enable: - -jumpurl\_enable -""""""""""""""" - -.. container:: table-row - - Property - jumpurl\_enable - - Data type - boolean - - Description - Enables JumpURL for all supported contexts for all generated links. - - -.. _configuration-global-jumpurl-mailto-disable: - -jumpurl\_mailto\_disable -"""""""""""""""""""""""" - -.. container:: table-row - - Property - jumpurl\_mailto\_disable - - Data type - boolean - - Description - Disables the use of JumpURL when linking to email-adresses. - - -.. ###### END~OF~TABLE ###### - - -.. _configuration-typolink: - -typolink settings -^^^^^^^^^^^^^^^^^ - -JumpURL options can be provided in the :ref:`typolink <t3tsref:typolink>` and the :ref:`filelink <t3tsref:filelink>` -configuration. - -The ``typolink`` options can be provided directly in the ``typolink`` namespace, e.g.: - -.. code-block:: typoscript - - mylink = TEXT - mylink.value = typo3.org - mylink.typolink.parameter = http://www.typo3.org - mylink.typolink.jumpurl = 1 - - -The :code:`filelink` options can be provided in the :code:`typolinkConfiguration` property: - -.. code-block:: typoscript - - mylink = TEXT - mylink.value = text.txt - mylink.filelink.path = fileadmin/ - mylink.filelink.typolinkConfiguration.jumpurl = 1 - - -The following options are available for JumpURLs. - - -.. ### BEGIN~OF~TABLE ### - - -.. _configuration-typolink-jumpurl: - -jumpurl -""""""" - -.. container:: table-row - - Property - jumpurl - - Data type - boolean - - Description - Enables JumpURL for the current link if it points to an external URL or a file. - - Please note that this does not work for internal links or for email links. - - To enable JumpURL for email links the global setting needs to be used. - - -.. _configuration-typolink-jumpurl-force-disable: - -jumpurl.forceDisable -"""""""""""""""""""" - -.. container:: table-row - - Property - jumpurl.forceDisable - - Data type - boolean - - Description - Disables JumpURL. - - This will override the global setting config.jumpurl_enable for the current link. - - -.. _configuration-typolink-jumpurl-secure: - -jumpurl.secure -"""""""""""""" - -.. container:: table-row - - Property - jumpurl.secure - - Data type - boolean - - Description - Enables JumpURL secure. This option is only available for file links. - - If set, then the file pointed to by jumpurl is **not** redirected to, but rather it's read - from the file and returned with a correct header. - - This option adds a hash and locationData to the URL and there MUST be access to the record - in order to download the file. - - If the file position on the server is furthermore secured by a .htaccess file preventing ANY - access, you've got secure download here! - - -.. _configuration-typolink-jumpurl-secure-mime-types: - -jumpurl.secure.mimeTypes -"""""""""""""""""""""""" - -.. container:: table-row - - Property - jumpurl.secure.mimeTypes - - Data type - string - - Description - With this option you can specify an alternative mime type that is sent in the HTTP Content-Type - header when the file is delivered to the user. By default the automatically detected mime type - will be used. - - Syntax: [ext] = [MIME type1], [ext2] = [MIME type2], ... - - **Example:** - - .. code-block:: typoscript - - jumpurl.secure = 1 - jumpurl.secure.mimeTypes = pdf=application/pdf, doc=application/msword - - -.. ###### END~OF~TABLE ###### - - -.. _configuration-typo3-conf-vars: - -TYPO3_CONF_VARS -^^^^^^^^^^^^^^^ - -The setting :php:`$GLOBALS['TYPO3_CONF_VARS']['SYS']['doNotCheckReferer']` can be used to disable -the referer check during jumpurl handling. By default the referring host must match the current -host, otherwise processing is stopped. - -The setting :php:`$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']` is used for generating -the hashes submitted in the URLs. \ No newline at end of file diff --git a/typo3/sysext/jumpurl/Documentation/Includes.txt b/typo3/sysext/jumpurl/Documentation/Includes.txt deleted file mode 100644 index 38aa39832f7e394fa5b5039abff75ec7a706bedf..0000000000000000000000000000000000000000 --- a/typo3/sysext/jumpurl/Documentation/Includes.txt +++ /dev/null @@ -1,21 +0,0 @@ -.. ================================================== -.. FOR YOUR INFORMATION -.. -------------------------------------------------- -.. -*- coding: utf-8 -*- with BOM. - -.. This is 'Includes.txt'. It is included at the very top of each and - every ReST source file in this documentation project (= manual). - - -.. ================================================== -.. DEFINE SOME TEXTROLES -.. -------------------------------------------------- - -.. role:: typoscript(code) - -.. role:: ts(typoscript) - :class: typoscript - -.. role:: php(code) - -.. highlight:: php diff --git a/typo3/sysext/jumpurl/Documentation/Index.rst b/typo3/sysext/jumpurl/Documentation/Index.rst deleted file mode 100644 index 16ba3ce9a7870c8aa1158dffa2429bd633a04618..0000000000000000000000000000000000000000 --- a/typo3/sysext/jumpurl/Documentation/Index.rst +++ /dev/null @@ -1,60 +0,0 @@ -.. ================================================== -.. FOR YOUR INFORMATION -.. -------------------------------------------------- -.. -*- coding: utf-8 -*- with BOM. - -.. include:: Includes.txt - - -.. _start: - -======== -JumpURL -======== - -:Extension key: - jumpurl - -:Version: - |release| - -:Language: - en - -:Description: - Allows to modify links to create Jump URLs created in the frontend of the TYPO3 Core. - -:Keywords: - jumpurl, sysext - -:Copyright: - 2015 - -:Author: - TYPO3 CMS Core Development Team - -:License: - Open Content License available from `www.opencontent.org/opl.shtml - <http://www.opencontent.org/opl.shtml>`_ - -:Rendered: - |today| - -The content of this document is related to TYPO3, - -a GNU/GPL CMS/Framework available from `www.typo3.org -<http://www.typo3.org/>`_ - - - - -**Table of Contents** - -.. toctree:: - :maxdepth: 5 - :titlesonly: - :glob: - - Introduction/Index - Configuration/Index - Targets diff --git a/typo3/sysext/jumpurl/Documentation/Introduction/Index.rst b/typo3/sysext/jumpurl/Documentation/Introduction/Index.rst deleted file mode 100644 index 64cb3486eedeab97d1208b31be9bdfd45aa6b84f..0000000000000000000000000000000000000000 --- a/typo3/sysext/jumpurl/Documentation/Introduction/Index.rst +++ /dev/null @@ -1,57 +0,0 @@ -.. ================================================== -.. FOR YOUR INFORMATION -.. -------------------------------------------------- -.. -*- coding: utf-8 -*- with BOM. - -.. include:: ../Includes.txt - - - -.. _introduction: - -Introduction ------------- - -**Hint!** The JumpURL functionality is deprecated and might be removed in future versions. - - -.. _what-does-it-do: - -What does it do? -^^^^^^^^^^^^^^^^ - -This Extension bundles the JumpURL functionality of TYPO3. JumpURL consists of -two components: link tracking and secure file access. - - -.. _introduction-link-tracking: - -Link tracking -^^^^^^^^^^^^^ - -The redirection to external URLs will be handled by a request to TYPO3. This allows the tracking -of clicks on links to external pages. Such a URL might look like this: - -http://mytypo3.tld/index.php?id=1&jumpurl=http%3A%2F%2Fwww.typo3.org&juHash=XXX - -When this URL is processed by TYPO3 the user will be redirected to http://www.typo3.org if -the sumitted juHash is valid. - -The same functionality can be used for file and email links. - - -.. _introduction-secure-file-access: - -Secure file access -^^^^^^^^^^^^^^^^^^ - -JumpURL can also make files downloadable that are not directly accessible by the web server. -This feature is called "JumpURL secure". - -A secure JumpURL link will deliver a file if the submitted hash matches. The record that -references the file needs to be accessible by the current user. When the referencing -record is removed or hidden the file will not be delivered to the user any more. - - - - diff --git a/typo3/sysext/jumpurl/Documentation/Settings.yml b/typo3/sysext/jumpurl/Documentation/Settings.yml deleted file mode 100644 index 89d21ccab7cdfc187b3f42f0bc2a0776997f1074..0000000000000000000000000000000000000000 --- a/typo3/sysext/jumpurl/Documentation/Settings.yml +++ /dev/null @@ -1,15 +0,0 @@ -# This is the project specific Settings.yml file. -# Place Sphinx specific build information here. -# Settings given here will replace the settings of 'conf.py'. - ---- -conf.py: - copyright: 2015 - project: JumpURL - version: 1 - release: 1 - intersphinx_mapping: - t3tsref: - - http://docs.typo3.org/typo3cms/TyposcriptReference/ - - null -... diff --git a/typo3/sysext/jumpurl/Documentation/Targets.rst b/typo3/sysext/jumpurl/Documentation/Targets.rst deleted file mode 100644 index c7c43c0bb448afd61d01ce37a6e5d46a679f7189..0000000000000000000000000000000000000000 --- a/typo3/sysext/jumpurl/Documentation/Targets.rst +++ /dev/null @@ -1,13 +0,0 @@ -.. ================================================== -.. FOR YOUR INFORMATION -.. -------------------------------------------------- -.. -*- coding: utf-8 -*- with BOM. - -.. include:: Includes.txt - -.. _index-labels-for-crossreferencing: - -Index: Labels for Crossreferencing -================================== - -.. ref-targets-list:: diff --git a/typo3/sysext/jumpurl/Tests/Unit/ContentObjectRendererTest.php b/typo3/sysext/jumpurl/Tests/Unit/ContentObjectRendererTest.php deleted file mode 100644 index bb0bcc44295b8855e3dc36491d54799552e50200..0000000000000000000000000000000000000000 --- a/typo3/sysext/jumpurl/Tests/Unit/ContentObjectRendererTest.php +++ /dev/null @@ -1,401 +0,0 @@ -<?php -namespace FoT3\Jumpurl\Tests\Unit; - -/* - * 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 Psr\Log\LoggerInterface; -use TYPO3\CMS\Core\Charset\CharsetConverter; -use TYPO3\CMS\Core\Database\DatabaseConnection; -use TYPO3\CMS\Core\Log\LogManager; -use TYPO3\CMS\Core\TimeTracker\TimeTracker; -use TYPO3\CMS\Core\TypoScript\TemplateService; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; -use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController; -use TYPO3\CMS\Frontend\Page\PageRepository; -use FoT3\Jumpurl\JumpUrlHandler; -use FoT3\Jumpurl\JumpUrlProcessor; - -/** - * Testcase for the jumpurl processing in TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer. - */ -class ContentObjectRendererTest extends \TYPO3\CMS\Core\Tests\UnitTestCase -{ - /** - * @var array A backup of registered singleton instances - */ - protected $singletonInstances = array(); - - /** - * @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface|\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer - */ - protected $subject = null; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\TypoScript\TemplateService - */ - protected $templateServiceMock = null; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface - */ - protected $typoScriptFrontendControllerMock = null; - - /** - * Set up - */ - protected function setUp() - { - $this->singletonInstances = GeneralUtility::getSingletonInstances(); - $this->createMockedLoggerAndLogManager(); - - $this->templateServiceMock = $this->getMock(TemplateService::class, array('getFileName')); - $pageRepositoryMock = $this->getMock(PageRepository::class, array('getPage')); - - $this->typoScriptFrontendControllerMock = $this->getAccessibleMock(TypoScriptFrontendController::class, array('dummy'), array(), '', false); - $this->typoScriptFrontendControllerMock->tmpl = $this->templateServiceMock; - $this->typoScriptFrontendControllerMock->config = array(); - $this->typoScriptFrontendControllerMock->page = array(); - $this->typoScriptFrontendControllerMock->sys_page = $pageRepositoryMock; - $this->typoScriptFrontendControllerMock->csConvObj = new CharsetConverter(); - $this->typoScriptFrontendControllerMock->renderCharset = 'utf-8'; - $GLOBALS['TSFE'] = $this->typoScriptFrontendControllerMock; - - $GLOBALS['TT'] = $this->getMock(TimeTracker::class, array('dummy')); - - $GLOBALS['TYPO3_DB'] = $this->getMock(DatabaseConnection::class, array()); - $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] = '12345'; - - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['urlProcessing']['urlProcessors']['jumpurl']['processor'] = JumpUrlProcessor::class; - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['urlProcessing']['urlHandlers']['jumpurl']['handler'] = JumpUrlHandler::class; - - $this->subject = $this->getAccessibleMock( - ContentObjectRenderer::class, - array('getResourceFactory', 'getEnvironmentVariable'), - array($this->typoScriptFrontendControllerMock) - ); - $this->subject->start(array(), 'tt_content'); - } - - protected function tearDown() - { - GeneralUtility::resetSingletonInstances($this->singletonInstances); - parent::tearDown(); - } - - /** - * @test - */ - public function filelinkCreatesCorrectJumpUrlSecureForFileWithUrlEncodedSpecialChars() - { - $testData = $this->initializeJumpUrlTestEnvironment($this->once()); - - $fileNameAndPath = PATH_site . 'typo3temp/phpunitJumpUrlTestFile with spaces & amps.txt'; - file_put_contents($fileNameAndPath, 'Some test data'); - $relativeFileNameAndPath = substr($fileNameAndPath, strlen(PATH_site)); - $fileName = substr($fileNameAndPath, strlen(PATH_site . 'typo3temp/')); - - $expectedHash = '304b8c8e022e92e6f4d34e97395da77705830818'; - $expectedLink = htmlspecialchars($testData['absRefPrefix'] . $testData['mainScript'] . '?id=' . $testData['pageId'] . '&type=' . $testData['pageType'] . '&jumpurl=' . rawurlencode(str_replace('%2F', '/', rawurlencode($relativeFileNameAndPath))) . '&juSecure=1&locationData=' . rawurlencode($testData['locationData']) . '&juHash=' . $expectedHash); - - $result = $this->subject->filelink($fileName, array('path' => 'typo3temp/', 'jumpurl' => '1', 'jumpurl.' => array('secure' => 1))); - $this->assertEquals('<a href="' . $expectedLink . '">' . $fileName . '</a>', $result); - - GeneralUtility::unlink_tempfile($fileNameAndPath); - } - - /** - * @test - */ - public function filelinkCreatesCorrectSecureJumpUrlIfConfigured() - { - $testData = $this->initializeJumpUrlTestEnvironment($this->once()); - - $fileNameAndPath = PATH_site . 'typo3temp/phpunitJumpUrlTestFile.txt'; - file_put_contents($fileNameAndPath, 'Some test data'); - $relativeFileNameAndPath = substr($fileNameAndPath, strlen(PATH_site)); - $fileName = substr($fileNameAndPath, strlen(PATH_site . 'typo3temp/')); - - $expectedHash = '1933f3c181db8940acfcd4d16c74643947179948'; - $expectedLink = htmlspecialchars($testData['absRefPrefix'] . $testData['mainScript'] . '?id=' . $testData['pageId'] . '&type=' . $testData['pageType'] . '&jumpurl=' . rawurlencode($relativeFileNameAndPath) . '&juSecure=1&locationData=' . rawurlencode($testData['locationData']) . '&juHash=' . $expectedHash); - - $result = $this->subject->filelink($fileName, array('path' => 'typo3temp/', 'jumpurl' => '1', 'jumpurl.' => array('secure' => 1))); - $this->assertEquals('<a href="' . $expectedLink . '">' . $fileName . '</a>', $result); - - GeneralUtility::unlink_tempfile($fileNameAndPath); - } - - /** - * @test - */ - public function filelinkDisablesGlobalJumpUrlIfConfigured() - { - $testData = $this->initializeJumpUrlTestEnvironment($this->never()); - - $fileName = 'phpunitJumpUrlTestFile.txt'; - $fileNameAndPath = 'typo3temp/' . $fileName; - file_put_contents(PATH_site . $fileNameAndPath, 'Some test data'); - - $expectedLink = $testData['absRefPrefix'] . $fileNameAndPath; - $expectedLink = '<a href="' . $expectedLink . '">' . $fileName . '</a>'; - - // Test with deprecated configuration, TODO: remove when deprecated code is removed! - $result = $this->subject->filelink($fileName, array('path' => 'typo3temp/', 'jumpurl' => 0)); - $this->assertEquals($expectedLink, $result); - - GeneralUtility::unlink_tempfile($fileNameAndPath); - } - - /** - * @test - */ - public function filelinkDisablesGlobalJumpUrlWithDeprecatedOptionIfConfigured() - { - $testData = $this->initializeJumpUrlTestEnvironment($this->never()); - - $fileName = 'phpunitJumpUrlTestFile.txt'; - $fileNameAndPath = 'typo3temp/' . $fileName; - file_put_contents(PATH_site . $fileNameAndPath, 'Some test data'); - - $expectedLink = $testData['absRefPrefix'] . $fileNameAndPath; - $expectedLink = '<a href="' . $expectedLink . '">' . $fileName . '</a>'; - - // Test with deprecated configuration - $result = $this->subject->filelink($fileName, array('path' => 'typo3temp/', 'jumpurl' => 0)); - $this->assertEquals($expectedLink, $result); - - GeneralUtility::unlink_tempfile($fileNameAndPath); - } - - /** - * @test - */ - public function makeHttpLinksCreatesCorrectJumpUrlIfConfigured() - { - $testData = $this->initializeJumpUrlTestEnvironment(); - - $testUrl = 'http://www.mytesturl.tld'; - $expectedHash = '7d2261b12682a4b73402ae67415e09f294b29a55'; - - $expectedLinkFirstPart = $testData['absRefPrefix'] . $testData['mainScript'] . '?id=' . $testData['pageId'] . '&type=' . $testData['pageType'] . '&jumpurl=' . rawurlencode($testUrl); - $expectedLinkSecondPart = '&juHash=' . $expectedHash; - - // due to a bug in the jump URL generation in the old version only - // the first part of the link is encoded which does not make much sense. - $expectedLink = htmlspecialchars($expectedLinkFirstPart . $expectedLinkSecondPart); - - $result = $this->subject->http_makelinks('teststring ' . $testUrl . ' anotherstring', array('keep' => 'scheme')); - $this->assertEquals('teststring <a href="' . $expectedLink . '">' . $testUrl . '</a> anotherstring', $result); - } - - /** - * @test - */ - public function makeMailtoLinksCreatesCorrectJumpUrlIfConfigured() - { - $testData = $this->initializeJumpUrlTestEnvironment(); - - $testMail = 'mail@ddress.tld'; - $testMailto = 'mailto:' . $testMail; - $expectedHash = 'bd82328dc40755f5d0411e2e16e7c0cbf33b51b7'; - $expectedLink = htmlspecialchars($testData['absRefPrefix'] . $testData['mainScript'] . '?id=' . $testData['pageId'] . '&type=' . $testData['pageType'] . '&jumpurl=' . rawurlencode($testMailto) . '&juHash=' . $expectedHash); - $result = $this->subject->mailto_makelinks('teststring ' . $testMailto . ' anotherstring', array()); - - $this->assertEquals('teststring <a href="' . $expectedLink . '">' . $testMail . '</a> anotherstring', $result); - } - - /** - * @test - */ - public function typoLinkCreatesCorrectJumpUrlForExternalUrl() - { - $testData = $this->initializeJumpUrlTestEnvironment(); - - $testAddress = 'http://external.domain.tld'; - $expectedHash = '8591c573601d17f37e06aff4ac14c78f107dd49e'; - $expectedUrl = $testData['absRefPrefix'] . $testData['mainScript'] . '?id=' . $testData['pageId'] . '&type=' . $testData['pageType'] . '&jumpurl=' . rawurlencode($testAddress) . '&juHash=' . $expectedHash; - $generatedUrl = $this->subject->typoLink_URL(array('parameter' => $testAddress)); - - $this->assertEquals($expectedUrl, $generatedUrl); - } - - /** - * @test - */ - public function typoLinkCreatesCorrectJumpUrlForExternalUrlWithUrlEncodedParameters() - { - $testData = $this->initializeJumpUrlTestEnvironment(); - - $testAddress = 'http://external.domain.tld?parameter1=' . rawurlencode('parameter[data]with&a lot-of-special/chars'); - $expectedHash = 'cfc95f583da7689238e98bbc8930ebd820f0d20f'; - $expectedUrl = $testData['absRefPrefix'] . $testData['mainScript'] . '?id=' . $testData['pageId'] . '&type=' . $testData['pageType'] . '&jumpurl=' . rawurlencode($testAddress) . '&juHash=' . $expectedHash; - $generatedUrl = $this->subject->typoLink_URL(array('parameter' => $testAddress)); - - $this->assertEquals($expectedUrl, $generatedUrl); - } - - /** - * @test - */ - public function typoLinkCreatesCorrectJumpUrlForFile() - { - $testData = $this->initializeJumpUrlTestEnvironment(); - - $fileNameAndPath = PATH_site . 'typo3temp/phpunitJumpUrlTestFile.txt'; - file_put_contents($fileNameAndPath, 'Some test data'); - $relativeFileNameAndPath = substr($fileNameAndPath, strlen(PATH_site)); - - $testAddress = $relativeFileNameAndPath; - $expectedHash = 'e36be153c32f4d4d0db1414e47a05cf3149923ae'; - $expectedUrl = $testData['absRefPrefix'] . $testData['mainScript'] . '?id=' . $testData['pageId'] . '&type=' . $testData['pageType'] . '&jumpurl=' . rawurlencode($testAddress) . '&juHash=' . $expectedHash; - $generatedUrl = $this->subject->typoLink_URL(array('parameter' => $testAddress)); - - $this->assertEquals($expectedUrl, $generatedUrl); - - GeneralUtility::unlink_tempfile($fileNameAndPath); - } - - /** - * @test - */ - public function typoLinkCreatesCorrectJumpUrlForFileWithSpecialUrlEncodedSpecialChars() - { - $testData = $this->initializeJumpUrlTestEnvironment(); - - $fileNameAndPath = PATH_site . 'typo3temp/phpunitJumpUrlTestFile with spaces & amps.txt'; - file_put_contents($fileNameAndPath, 'Some test data'); - $relativeFileNameAndPath = substr($fileNameAndPath, strlen(PATH_site)); - - $testFileLink = $relativeFileNameAndPath; - $expectedHash = '691dbf63a21181e2d69bf78e61f1c9fd023aef2c'; - $expectedUrl = $testData['absRefPrefix'] . $testData['mainScript'] . '?id=' . $testData['pageId'] . '&type=' . $testData['pageType'] . '&jumpurl=' . rawurlencode(str_replace('%2F', '/', rawurlencode($testFileLink))) . '&juHash=' . $expectedHash; - $generatedUrl = $this->subject->typoLink_URL(array('parameter' => str_replace('%2F', '/', rawurlencode($testFileLink)))); - - $this->assertEquals($expectedUrl, $generatedUrl); - - GeneralUtility::unlink_tempfile($fileNameAndPath); - } - - /** - * @test - */ - public function typoLinkCreatesCorrectJumpUrlForFileWithUrlEncodedSpecialChars() - { - $testData = $this->initializeJumpUrlTestEnvironment(); - - $fileNameAndPath = PATH_site . 'typo3temp/phpunitJumpUrlTestFile with spaces & amps.txt'; - file_put_contents($fileNameAndPath, 'Some test data'); - $relativeFileNameAndPath = substr($fileNameAndPath, strlen(PATH_site)); - - $testFileLink = $relativeFileNameAndPath; - $expectedHash = '691dbf63a21181e2d69bf78e61f1c9fd023aef2c'; - $expectedUrl = $testData['absRefPrefix'] . $testData['mainScript'] . '?id=' . $testData['pageId'] . '&type=' . $testData['pageType'] . '&jumpurl=' . rawurlencode(str_replace('%2F', '/', rawurlencode($testFileLink))) . '&juHash=' . $expectedHash; - $generatedUrl = $this->subject->typoLink_URL(array('parameter' => rawurlencode($testFileLink))); - - $this->assertEquals($expectedUrl, $generatedUrl); - - GeneralUtility::unlink_tempfile($fileNameAndPath); - } - - /** - * @test - */ - public function typoLinkCreatesCorrectJumpUrlForMail() - { - $testData = $this->initializeJumpUrlTestEnvironment(); - - $testAddress = 'mail@ddress.tld'; - $expectedHash = 'bd82328dc40755f5d0411e2e16e7c0cbf33b51b7'; - $expectedUrl = $testData['absRefPrefix'] . $testData['mainScript'] . '?id=' . $testData['pageId'] . '&type=' . $testData['pageType'] . '&jumpurl=' . rawurlencode('mailto:' . $testAddress) . '&juHash=' . $expectedHash; - $generatedUrl = $this->subject->typoLink_URL(array('parameter' => $testAddress)); - - $this->assertEquals($expectedUrl, $generatedUrl); - } - - /** - * @test - */ - public function typoLinkCreatesCorrectSecureJumpUrlForFile() - { - $testData = $this->initializeJumpUrlTestEnvironment(); - - $fileNameAndPath = PATH_site . 'typo3temp/phpunitJumpUrlTestFile.txt'; - file_put_contents($fileNameAndPath, 'Some test data'); - $relativeFileNameAndPath = substr($fileNameAndPath, strlen(PATH_site)); - - $testAddress = $relativeFileNameAndPath; - $expectedHash = '1933f3c181db8940acfcd4d16c74643947179948'; - $expectedUrl = $testData['absRefPrefix'] . $testData['mainScript'] . '?id=' . $testData['pageId'] . '&type=' . $testData['pageType'] . '&jumpurl=' . rawurlencode($testAddress) . '&juSecure=1&locationData=' . rawurlencode($testData['locationData']) . '&juHash=' . $expectedHash; - $generatedUrl = $this->subject->typoLink_URL(array('parameter' => $testAddress, 'jumpurl.' => array('secure' => 1))); - - $this->assertEquals($expectedUrl, $generatedUrl); - - GeneralUtility::unlink_tempfile($fileNameAndPath); - } - - /** - * Avoid logging to the file system (file writer is currently the only configured writer) - */ - protected function createMockedLoggerAndLogManager() - { - /** @var \TYPO3\CMS\Core\SingletonInterface $logManagerMock */ - $logManagerMock = $this->getMock(LogManager::class); - $loggerMock = $this->getMock(LoggerInterface::class); - $logManagerMock->expects($this->any()) - ->method('getLogger') - ->willReturn($loggerMock); - GeneralUtility::setSingletonInstance(LogManager::class, $logManagerMock); - } - - /** - * Initializes all required settings in $GLOBALS['TSFE'] and the current - * content object renderer for testing jump URL functionality. - * - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectedGetPageCalls - * @return array - */ - protected function initializeJumpUrlTestEnvironment($expectedGetPageCalls = null) - { - if (!isset($expectedGetPageCalls)) { - $expectedGetPageCalls = $this->once(); - } - - $testData = array(); - - $this->typoScriptFrontendControllerMock->config['config']['jumpurl_enable'] = true; - - $testData['pageId'] = $this->typoScriptFrontendControllerMock->id = '1234'; - $testData['pageType'] = $this->typoScriptFrontendControllerMock->type = '4'; - $testData['mainScript'] = $this->typoScriptFrontendControllerMock->config['mainScript'] = 'index.php'; - $testData['absRefPrefix'] = $this->typoScriptFrontendControllerMock->absRefPrefix = '/prefix/'; - $this->subject->currentRecord = 'tt_content:999'; - $testData['locationData'] = $testData['pageId'] . ':' . $this->subject->currentRecord; - - /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Frontend\Page\PageRepository $pageRepositoryMock */ - $pageRepositoryMock = $this->typoScriptFrontendControllerMock->sys_page; - $pageRepositoryMock->expects($expectedGetPageCalls) - ->method('getPage') - ->will($this->returnValue( - array( - 'uid' => $testData['pageId'], - 'doktype' => \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_DEFAULT, - 'url_scheme' => 0, - 'title' => 'testpage', - ) - ) - ); - - return $testData; - } -} diff --git a/typo3/sysext/jumpurl/Tests/Unit/JumpUrlHandlerTest.php b/typo3/sysext/jumpurl/Tests/Unit/JumpUrlHandlerTest.php deleted file mode 100644 index 31ae4c06236251f4de5bfeb13a84cf9feb9f6972..0000000000000000000000000000000000000000 --- a/typo3/sysext/jumpurl/Tests/Unit/JumpUrlHandlerTest.php +++ /dev/null @@ -1,358 +0,0 @@ -<?php -namespace FoT3\Jumpurl\Tests\Unit; - -/* - * 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\Resource\Exception\FileDoesNotExistException; -use TYPO3\CMS\Core\Resource\File; -use TYPO3\CMS\Core\Resource\ResourceFactory; -use TYPO3\CMS\Core\Utility\HttpUtility; -use TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication; -use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController; -use FoT3\Jumpurl\JumpUrlHandler; - -/** - * Testcase for handling jump URLs when given with a test parameter - */ -class JumpUrlHandlerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase -{ - /** - * The default location data used for JumpUrl secure. - * - * @var string - */ - protected $defaultLocationData = '1234:tt_content:999'; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject|JumpUrlHandler - */ - protected $jumpUrlHandler; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface|\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController - */ - protected $tsfe; - - /** - * Sets environment variables and initializes global mock object. - */ - protected function setUp() - { - parent::setUp(); - - $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] = '12345'; - - $this->jumpUrlHandler = $this->getMock( - JumpUrlHandler::class, - array('isLocationDataValid', 'getResourceFactory', 'getTypoScriptFrontendController', 'readFileAndExit', 'redirect') - ); - - $this->tsfe = $this->getAccessibleMock( - TypoScriptFrontendController::class, - array('getPagesTSconfig'), - array(), - '', - false - ); - $this->jumpUrlHandler->expects($this->any()) - ->method('getTypoScriptFrontendController') - ->will($this->returnValue($this->tsfe)); - } - - /** - * Provides a valid jump URL hash and a target URL - * - * @return array - */ - public function jumpUrlDefaultValidParametersDataProvider() - { - return array( - 'File with spaces and ampersands' => array( - '691dbf63a21181e2d69bf78e61f1c9fd023aef2c', - str_replace('%2F', '/', rawurlencode('typo3temp/phpunitJumpUrlTestFile with spaces & amps.txt')), - ), - 'External URL' => array( - '7d2261b12682a4b73402ae67415e09f294b29a55', - 'http://www.mytesturl.tld', - ), - 'External URL with GET parameters' => array( - 'cfc95f583da7689238e98bbc8930ebd820f0d20f', - 'http://external.domain.tld?parameter1=' . rawurlencode('parameter[data]with&a lot-of-special/chars'), - ), - 'External URL without www' => array( - '8591c573601d17f37e06aff4ac14c78f107dd49e', - 'http://external.domain.tld', - ), - 'Mailto link' => array( - 'bd82328dc40755f5d0411e2e16e7c0cbf33b51b7', - 'mailto:mail@ddress.tld', - ) - ); - } - - /** - * @test - * @dataProvider jumpUrlDefaultValidParametersDataProvider - * @param string $hash - * @param string $jumpUrl - */ - public function jumpUrlDefaultAcceptsValidUrls($hash, $jumpUrl) - { - $_GET['juHash'] = $hash; - $_GET['jumpurl'] = $jumpUrl; - - $this->jumpUrlHandler->expects($this->once()) - ->method('redirect') - ->with($jumpUrl, HttpUtility::HTTP_STATUS_303); - - $this->jumpUrlHandler->canHandleCurrentUrl(); - $this->jumpUrlHandler->handle(); - } - - /** - * @test - * @dataProvider jumpUrlDefaultValidParametersDataProvider - * @expectedException \Exception - * @expectedExceptionCode 1359987599 - * @param string $hash - * @param string $jumpUrl - */ - public function jumpUrlDefaultFailsOnInvalidHash($hash, $jumpUrl) - { - $_GET['jumpurl'] = $jumpUrl; - $_GET['juHash'] = $hash . '1'; - - $this->jumpUrlHandler->canHandleCurrentUrl(); - $this->jumpUrlHandler->handle(); - } - - /** - * @test - * @dataProvider jumpUrlDefaultValidParametersDataProvider - * @param string $hash - * @param string $jumpUrl - */ - public function jumpUrlDefaultTransfersSession($hash, $jumpUrl) - { - $tsConfig['TSFE.']['jumpUrl_transferSession'] = 1; - - /** @var \PHPUnit_Framework_MockObject_MockObject|FrontendUserAuthentication $frontendUserMock */ - $frontendUserMock = $this->getMock(FrontendUserAuthentication::class); - $frontendUserMock->id = 123; - - $this->tsfe->_set('fe_user', $frontendUserMock); - $this->tsfe->expects($this->once()) - ->method('getPagesTSconfig') - ->will($this->returnValue($tsConfig)); - - $sessionGetParameter = (strpos($jumpUrl, '?') === false ? '?' : '') . '&FE_SESSION_KEY=123-fc9f825a9af59169895f3bb28267a42f'; - $expectedJumpUrl = $jumpUrl . $sessionGetParameter; - - $this->jumpUrlHandler->expects($this->once()) - ->method('redirect') - ->with($expectedJumpUrl, HttpUtility::HTTP_STATUS_303); - - $_GET['jumpurl'] = $jumpUrl; - $_GET['juHash'] = $hash; - - $this->jumpUrlHandler->canHandleCurrentUrl(); - $this->jumpUrlHandler->handle(); - } - - /** - * Provides a valid jump secure URL hash, a file path and related - * record data - * - * @return array - */ - public function jumpUrlSecureValidParametersDataProvider() - { - return array( - array( - '1933f3c181db8940acfcd4d16c74643947179948', - 'typo3temp/phpunitJumpUrlTestFile.txt', - ), - array( - '304b8c8e022e92e6f4d34e97395da77705830818', - str_replace('%2F', '/', rawurlencode('typo3temp/phpunitJumpUrlTestFile with spaces & amps.txt')), - ), - array( - '304b8c8e022e92e6f4d34e97395da77705830818', - str_replace('%2F', '/', rawurlencode('typo3temp/phpunitJumpUrlTestFile with spaces & amps.txt')), - ) - ); - } - - /** - * @test - * @dataProvider jumpUrlSecureValidParametersDataProvider - * @param string $hash - * @param string $jumpUrl - */ - public function jumpUrlSecureAcceptsValidUrls($hash, $jumpUrl) - { - $_GET['jumpurl'] = $jumpUrl; - $this->prepareJumpUrlSecureTest($hash); - - $fileMock = $this->getMock(File::class, array('dummy'), array(), '', false); - $resourceFactoryMock = $this->getMock(ResourceFactory::class, array('retrieveFileOrFolderObject')); - - $resourceFactoryMock->expects($this->once()) - ->method('retrieveFileOrFolderObject') - ->will($this->returnValue($fileMock)); - - $this->jumpUrlHandler->expects($this->once()) - ->method('isLocationDataValid') - ->with($this->defaultLocationData) - ->will($this->returnValue(true)); - - $this->jumpUrlHandler->expects($this->once()) - ->method('getResourceFactory') - ->will($this->returnValue($resourceFactoryMock)); - - $this->jumpUrlHandler->expects($this->once()) - ->method('readFileAndExit') - ->with($fileMock); - - $this->jumpUrlHandler->canHandleCurrentUrl(); - $this->jumpUrlHandler->handle(); - } - - /** - * @test - * @dataProvider jumpUrlSecureValidParametersDataProvider - * @expectedException \Exception - * @expectedExceptionCode 1294585193 - * @param string $hash - * @param string $jumpUrl - */ - public function jumpUrlSecureFailsIfFileDoesNotExist($hash, $jumpUrl) - { - $_GET['jumpurl'] = $jumpUrl; - $this->prepareJumpUrlSecureTest($hash); - - $resourceFactoryMock = $this->getMock(ResourceFactory::class, array('retrieveFileOrFolderObject')); - $resourceFactoryMock->expects($this->once()) - ->method('retrieveFileOrFolderObject') - ->will($this->throwException(new FileDoesNotExistException())); - - $this->jumpUrlHandler->expects($this->once()) - ->method('isLocationDataValid') - ->with($this->defaultLocationData) - ->will($this->returnValue(true)); - - $this->jumpUrlHandler->expects($this->once()) - ->method('getResourceFactory') - ->will($this->returnValue($resourceFactoryMock)); - - $this->jumpUrlHandler->canHandleCurrentUrl(); - $this->jumpUrlHandler->handle(); - } - - /** - * @test - * @dataProvider jumpUrlSecureValidParametersDataProvider - * @expectedException \Exception - * @expectedExceptionCode 1294585195 - * @param string $hash - * @param string $jumpUrl - */ - public function jumpUrlSecureFailsOnDeniedAccess($hash, $jumpUrl) - { - $_GET['jumpurl'] = $jumpUrl; - $this->prepareJumpUrlSecureTest($hash); - - $this->jumpUrlHandler->expects($this->once()) - ->method('isLocationDataValid') - ->with($this->defaultLocationData) - ->will($this->returnValue(false)); - - $this->jumpUrlHandler->canHandleCurrentUrl(); - $this->jumpUrlHandler->handle(); - } - - /** - * @test - * @dataProvider jumpUrlSecureValidParametersDataProvider - * @expectedException \Exception - * @expectedExceptionCode 1294585196 - * @param string $hash - * @param string $jumpUrl - */ - public function jumpUrlSecureFailsOnInvalidHash($hash, $jumpUrl - ) { - $_GET['juSecure'] = '1'; - $_GET['juHash'] = $hash . '1'; - $_GET['locationData'] = $this->defaultLocationData; - - $this->jumpUrlHandler->canHandleCurrentUrl(); - $this->jumpUrlHandler->handle(); - } - - /** - * @return array - */ - public function jumpUrlSecureFailsOnForbiddenFileLocationDataProvider() - { - return array( - 'totally forbidden' => array( - '/a/totally/forbidden/path' - ), - 'typo3conf file' => array( - PATH_site . '/typo3conf/path' - ), - 'file with forbidden character' => array( - PATH_site . '/mypath/test.php' - ) - ); - } - - /** - * @test - * @dataProvider jumpUrlSecureFailsOnForbiddenFileLocationDataProvider - * @expectedException \Exception - * @expectedExceptionCode 1294585194 - * @param string $path - * @param string $path - */ - public function jumpUrlSecureFailsOnForbiddenFileLocation($path) - { - $this->jumpUrlHandler->expects($this->once()) - ->method('isLocationDataValid') - ->with('') - ->will($this->returnValue(true)); - - - $hash = \FoT3\Jumpurl\JumpUrlUtility::calculateHashSecure($path, '', ''); - - $_GET['jumpurl'] = $path; - $_GET['juSecure'] = '1'; - $_GET['juHash'] = $hash; - $_GET['locationData'] = ''; - - $this->jumpUrlHandler->canHandleCurrentUrl(); - $this->jumpUrlHandler->handle(); - } - - /** - * @param string $hash - * @return void - */ - protected function prepareJumpUrlSecureTest($hash) - { - $_GET['juSecure'] = '1'; - $_GET['juHash'] = $hash; - $_GET['locationData'] = $this->defaultLocationData; - } -} diff --git a/typo3/sysext/jumpurl/Tests/Unit/JumpUrlProcessorMock.php b/typo3/sysext/jumpurl/Tests/Unit/JumpUrlProcessorMock.php deleted file mode 100644 index f352367dcba573f9e00c40b9c92e335ee7317a0e..0000000000000000000000000000000000000000 --- a/typo3/sysext/jumpurl/Tests/Unit/JumpUrlProcessorMock.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php -namespace FoT3\Jumpurl\Tests\Unit; - -/* - * 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 FoT3\Jumpurl\JumpUrlProcessor; - -/** - * Testcase for handling jump URLs when given with a test parameter - */ -class JumpUrlProcessorMock extends JumpUrlProcessor -{ - /** - * Makes the parent getParametersForSecureFile() method accessible. - * - * @param string $jumpUrl - * @param array $configuration - * @return array - */ - public function getParametersForSecureFile($jumpUrl, array $configuration) - { - return parent::getParametersForSecureFile($jumpUrl, $configuration); - } -} diff --git a/typo3/sysext/jumpurl/Tests/Unit/JumpUrlProcessorTest.php b/typo3/sysext/jumpurl/Tests/Unit/JumpUrlProcessorTest.php deleted file mode 100644 index 51c49dce376c687c60fdfc300506355c15386240..0000000000000000000000000000000000000000 --- a/typo3/sysext/jumpurl/Tests/Unit/JumpUrlProcessorTest.php +++ /dev/null @@ -1,101 +0,0 @@ -<?php -namespace FoT3\Jumpurl\Tests\Unit; - -/* - * 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\Frontend\ContentObject\ContentObjectRenderer; -use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController; - -/** - * Testcase for handling jump URLs when given with a test parameter - */ -class JumpUrlProcessorTest extends \TYPO3\CMS\Core\Tests\UnitTestCase -{ - /** - * @var \PHPUnit_Framework_MockObject_MockObject|ContentObjectRenderer - */ - protected $contentObjectRenderer; - - /** - * The default location data used for JumpUrl secure. - * - * @var string - */ - protected $defaultLocationData = '1234:tt_content:999'; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject|JumpUrlProcessorMock - */ - protected $jumpUrlProcessor; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface|\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController - */ - protected $tsfe; - - /** - * Sets environment variables and initializes global mock object. - */ - protected function setUp() - { - parent::setUp(); - - $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] = '12345'; - - $this->jumpUrlProcessor = $this->getMock( - JumpUrlProcessorMock::class, - array('getTypoScriptFrontendController', 'getContentObjectRenderer') - ); - - $this->tsfe = $this->getAccessibleMock( - TypoScriptFrontendController::class, - array('getPagesTSconfig'), - array(), - '', - false - ); - $this->jumpUrlProcessor->expects($this->any()) - ->method('getTypoScriptFrontendController') - ->will($this->returnValue($this->tsfe)); - - $this->contentObjectRenderer = $this->getMock(ContentObjectRenderer::class); - $this->jumpUrlProcessor->expects($this->any()) - ->method('getContentObjectRenderer') - ->will($this->returnValue($this->contentObjectRenderer)); - } - - /** - * @test - */ - public function getJumpUrlSecureParametersReturnsValidParameters() - { - $this->tsfe->id = 456; - $this->contentObjectRenderer->currentRecord = 'tt_content:123'; - - $jumpUrlSecureParameters = $this->jumpUrlProcessor->getParametersForSecureFile( - '/fileadmin/a/test/file.txt', - array('mimeTypes' => 'dummy=application/x-executable,txt=text/plain') - ); - - $this->assertSame( - array( - 'juSecure' => 1, - 'locationData' => '456:tt_content:123', - 'mimeType' => 'text/plain', - 'juHash' => '1cccb7f01c8a3f58ee890377b5de9bdc05115a37', - ), - $jumpUrlSecureParameters - ); - } -} diff --git a/typo3/sysext/jumpurl/composer.json b/typo3/sysext/jumpurl/composer.json deleted file mode 100644 index 3fe4118d0eac13718827fc3830bef942167276b4..0000000000000000000000000000000000000000 --- a/typo3/sysext/jumpurl/composer.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "friendsoftypo3/jumpurl", - "type": "typo3-cms-extension", - "description": "TYPO3 Jump URL handling", - "homepage": "https://typo3.org", - "license": ["GPL-2.0+"], - - "require": { - "typo3/cms-core": "~7.5", - "typo3/cms-frontend": "~7.5" - }, - "replace": { - "jumpurl": "*" - }, - "autoload": { - "psr-4": { - "FoT3\\Jumpurl\\": "Classes/" - } - }, - "autoload-dev": { - "psr-4": { - "FoT3\\Jumpurl\\Tests\\": "Tests/" - } - } -} diff --git a/typo3/sysext/jumpurl/ext_emconf.php b/typo3/sysext/jumpurl/ext_emconf.php deleted file mode 100644 index ed93ee713e9d274a5142f6db43ca036eaca7a2e5..0000000000000000000000000000000000000000 --- a/typo3/sysext/jumpurl/ext_emconf.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php -$EM_CONF[$_EXTKEY] = array( - 'title' => 'JumpURL', - 'description' => 'Allows to modify links to create Jump URLs created in the frontend of the TYPO3 Core.', - 'category' => 'fe', - 'author' => 'Friends of TYPO3', - 'author_email' => 'friendsof@typo3.org', - 'state' => 'stable', - 'uploadfolder' => 0, - 'createDirs' => '', - 'clearCacheOnLoad' => 1, - 'author_company' => '', - 'version' => '7.6.0', - 'constraints' => array( - 'depends' => array( - 'typo3' => '7.6.0-7.99.99', - ), - 'conflicts' => array(), - 'suggests' => array(), - ), -); diff --git a/typo3/sysext/jumpurl/ext_icon.png b/typo3/sysext/jumpurl/ext_icon.png deleted file mode 100644 index ef81ce288743eabb87151fa3dc79fbbbc95b2e1c..0000000000000000000000000000000000000000 Binary files a/typo3/sysext/jumpurl/ext_icon.png and /dev/null differ diff --git a/typo3/sysext/jumpurl/ext_localconf.php b/typo3/sysext/jumpurl/ext_localconf.php deleted file mode 100644 index c610e05e42448d8654650653f5ad9980b594bf7b..0000000000000000000000000000000000000000 --- a/typo3/sysext/jumpurl/ext_localconf.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php -defined('TYPO3_MODE') or die(); - -// Register hooks -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['urlProcessing']['urlProcessors']['jumpurl']['processor'] = \FoT3\Jumpurl\JumpUrlProcessor::class; -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['urlProcessing']['urlHandlers']['jumpurl'] = [ - 'handler' => \FoT3\Jumpurl\JumpUrlHandler::class, - 'before' => [ - 'frontendExternalUrl' - ], -];