Project

General

Profile

Actions

Bug #64536

closed

Backend Search Box

Added by micka no-lastname-given almost 10 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
-- undefined --
Assignee:
-
Category:
-
Target version:
Start date:
2015-01-27
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

A backend user (not admin) can see in the results, the data which it has no access (eg "templates Main TS" on the image)

More information in french : http://forum.typo3-fr.org/topic/22756-moteur-de-recherche-backend/page__pid__86580


Files

TYPOP3_bug_64536_live_search_results.png (13.6 KB) TYPOP3_bug_64536_live_search_results.png screenshot of live search results Olivier SC, 2015-01-28 10:04
Actions #1

Updated by Olivier SC almost 10 years ago

File : /typo3/sysext/backend/Classes/Search/LiveSearch/LiveSearch.php (v6.2.3)
File : /t3lib/search/class.t3lib_search_livesearch.php (v4.5.39)

function : findByGlobalTableList
it search in all available fields in all tables from TCA.
In deeper function, there is a filter on page ID, but nothing on "access right" for specific table (like exclude "sys_template" for non admin).

the loop in "findByGlobalTableList" may verify access right for table before trying to make query for this table.

I'm not sure but we can use something like :
$GLOBALS['BE_USER']->check('tables_select', $tableName)

    protected function findByGlobalTableList($pageIdList) {
        $limit = $this->limitCount;
        $getRecordArray = array();
        foreach ($GLOBALS['TCA'] as $tableName => $value) {

/********** from here ********/
            //if no "listing access" for the table, skip this table (maybe must check "tables_modify", I don't know)
            if (!$GLOBALS['BE_USER']->check('tables_select', $tableName)){
                continue;
            }
/********** to here ********/
            $recordArray = $this->findByTable($tableName, $pageIdList, '0,' . $limit);
            $recordCount = count($recordArray);
            if ($recordCount) {
                $limit = $limit - $recordCount;
                $getRecordArray[] = $recordArray;
                if ($limit <= 0) {
                    break;
                }
            }
        }
        return $getRecordArray;
    }

I can provide patch, but for witch version of TYPO3?
Actions #2

Updated by micka no-lastname-given almost 10 years ago

The "bug" was observed on the version 6.2.9

Actions #3

Updated by Frans Saris almost 10 years ago

Olivier SC wrote:

[...]
I can provide patch, but for witch version of TYPO3?

Hi Olivier, if you create a patch this should normally always be for master.

Gr. Frans

Actions #4

Updated by Olivier SC almost 10 years ago

How to reproduce :
- go to the TYPO3 demo website http://cms62.demo.typo3.org/typo3/ (v6.2.8 in January 2015)
- log in with "advanced_editor/password" (not an "admin" account)
- in the page tree, click on "Congratulations"
- in the "live search" field, write "introduction"

result => In the suggested results there is record : "Template : Introduction Package"
but "advanced_editor" is not admin and should not see this type of records.

Actions #5

Updated by Benni Mack over 9 years ago

  • Status changed from New to Accepted
  • Target version set to 7.4 (Backend)
  • Sprint Focus set to On Location Sprint
Actions #6

Updated by Gerrit Code Review over 9 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/41600

Actions #7

Updated by Tim Lochmüller over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Anja Leichsenring almost 9 years ago

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

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF