Bug #16561
closedTypolink doesn't check if a page in rootline has some access and include subpages is set...
0%
Description
Typolink doesn't check the parent sides for enableFields together with include subpages
Example: try to search for a subsite in the indexSearch or link this side directly.
The link is working but you are sent to the first parent side, which is accessable...
typolink checks with calling $GLOBALS['TSFE']->sys_page->getPage
There is no check for parent sides.
(issue imported from #M4213)
Files
Updated by Volker Graubaum about 18 years ago
To files has to be changed
1) class.tslib_content.php
change line 5193 $page = $GLOBALS['TSFE']->sys_page->getPage($link_param,$disableGroupAccessCheck);
to
$page = $GLOBALS['TSFE']->sys_page->getPage($link_param,$disableGroupAccessCheck,TRUE);
(a third parameter is added for getPage)
2) class.t3lib_page.php
Line 184ff
Change the function get Page and add the function checkPage
/**
* Returns the $row for the page with uid = $uid (observing ->where_hid_del)
* Any pages_language_overlay will be applied before the result is returned.
* If no page is found an empty array is returned.
*
* @param integer The page id to look up.
* @param boolean If set, the check for group access is disabled. VERY rarely used
* @param boolean If set, the check will include the rootline
* @return array The page row with overlayed localized fields. Empty it no page.
* @see getPage_noCheck()
/
function getPage($uid, $disableGroupAccessCheck=FALSE,$userRootlineCheck=FALSE) {
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('', 'pages', 'uid='.intval($uid).$this->where_hid_del.($disableGroupAccessCheck ? '' : $this->where_groupAccess));
$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
$check = ($userRootlineCheck ? $this->checkPage($uid) : 1 );
if ($row && $check){
$this->versionOL('pages',$row);
if (is_array($row)) return $this->getPageOverlay($row);
}
return Array();
}
/**
* Checks the current rootline for defined sections.
*
* @param integer The page id to look up.
* @return boolean
*/
function checkPage($uid) {
$MP = t3lib_div::_GP('MP');
$rootLine = $this->getRootLine($uid,$MP);
$c=count($rootLine);
while(list($k,$page) = each($rootLine)){
if($page['title']=='Seminare'){
if ($page['extendToSubpages'] && !$GLOBALS['TSFE']->checkEnableFields($page)) {
return false;
}
}
}
return true;
}
Updated by Christian Kuhn over 15 years ago
confirmed for 4.3, please take a look at the duplicate issues for a "how to reproduce"
Updated by Christian Kuhn over 13 years ago
- Category deleted (
Communication) - Assignee deleted (
Christian Kuhn) - Target version deleted (
0)
Updated by Riccardo De Contardi about 9 years ago
- Category set to TypoScript
- Is Regression set to No
Updated by Dima Nozdrin almost 6 years ago
- Related to Bug #87025: sysext:seo: XML sitemap shouldn't display subpages of a restricted page added
Updated by Susanne Moog over 2 years ago
- Complexity set to hard
- Sprint Focus set to On Location Sprint
Updated by Oliver Hader about 2 years ago
- Sprint Focus deleted (
On Location Sprint)
Updated by Christian Kuhn about 1 year ago
- Status changed from Accepted to Closed
I hope it's ok to close here since so much happened over the years that we should start with a fresh issue if there are still problems.