Project

General

Profile

Actions

Bug #16561

closed

Typolink doesn't check if a page in rootline has some access and include subpages is set...

Added by Volker Graubaum about 18 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2006-09-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
4.3
Tags:
Complexity:
hard
Is Regression:
No
Sprint Focus:
Stabilization Sprint

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

4213_v1.diff (3.73 KB) 4213_v1.diff Administrator Admin, 2009-06-27 01:09

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #87025: sysext:seo: XML sitemap shouldn't display subpages of a restricted pageClosed2018-11-28

Actions
Has duplicate TYPO3 Core - Bug #17952: typolinkLinkAccessRestrictedPages / showAccessRestrictedPages access does not work with "include subpages"ClosedChristian Kuhn2007-12-26

Actions
Has duplicate TYPO3 Core - Bug #19297: extendToSubpages not workingClosedChristian Kuhn2008-09-07

Actions
Actions #1

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;
}
Actions #2

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"

Actions #3

Updated by Christian Kuhn over 13 years ago

  • Category deleted (Communication)
  • Assignee deleted (Christian Kuhn)
  • Target version deleted (0)
Actions #4

Updated by Riccardo De Contardi about 9 years ago

  • Category set to TypoScript
  • Is Regression set to No
Actions #5

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
Actions #6

Updated by Susanne Moog over 2 years ago

  • Complexity set to hard
  • Sprint Focus set to On Location Sprint
Actions #7

Updated by Oliver Hader about 2 years ago

  • Sprint Focus deleted (On Location Sprint)
Actions #8

Updated by Benni Mack over 1 year ago

  • Sprint Focus set to Stabilization Sprint
Actions #9

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.

Actions

Also available in: Atom PDF