#66881Link from MS Word leads always to home.html
Description
This report is about TYPO3 CMS 6.2.12 with PHP Version 5.4.27 on a UNIX server.
Context
- Our employees sometimes exchange MS Office 2010 Word documents where they have several links to protected pages of a TYPO3 CMS 6.2.12 website.
- The website has a login feature which works like the following:
0. User wants to call a URL to a protected page of the website mentioned above.
1. She/he lands on the login page and in browser you have URL: http://typo3installation.com/home.html?referer=<path_to_protected_page><br> 2. After providing her/his login data she/he will get redirected to the protected page.</path_to_protected_page>
Description
[Case A]
We assume that the user is not logged in to the TYPO3 website mentionend above.
If the user subsequently clicks several links to protected pages from a MS Office 2010 Word document the following happens:
1. First link: Same behavior mentioned above by steps 0 to 2. Keep in mind that user now is logged in.
2. Second and all other links: User always gets redirected to the following URL http://typo3installation.com/home.html?referer=<path_to_protected_page>, but she/he is already logged in… <br>——> hence she/he can never reach the page.</path_to_protected_page>
[Case B]
We assume that the user is logged in to the TYPO3 website mentionend above.
If the user subsequently clicks several links to protected pages from a MS Office 2010 Word document the following happens:
Every link (so also the first link) leads to http://typo3installation.com/home.html?referer=<path_to_protected_page> —> hence user never reaches the wished page.</path_to_protected_page>
Our current fix:
We have put on the page where the login is a little plugin doing the following in its controller:
if ('' !== GeneralUtility::_GET('referer') &&
is_string(GeneralUtility::_GET('referer')) &&
NULL !== $GLOBALS['TSFE']->fe_user->user &&
isset($GLOBALS['TSFE']->fe_user->user['username']) &&
!headers_sent()) {
$this->redirectToUri(GeneralUtility::_GET('referer'));
exit;
}
Please have a look onto this as I think it is crucial for a CMS to have a proper link handling.
PS:
Calling the links to protected pages from a simple html document works.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.