From fdd4e3021b558cb4bfe009aee1ad43af2b0798b0 Mon Sep 17 00:00:00 2001 From: Mona Muzaffar <mona.muzaffar@gmx.de> Date: Wed, 18 Jan 2017 14:42:56 +0100 Subject: [PATCH] [BUGFIX] Access check for delete pages expects array of integers An error occurs in the createNamedParameter function which expects an array but gets a string instead. Change-Id: I393a6a87c912129ded28f677ca65c081fc4205e7 Resolves: #79309 Releases: master Reviewed-on: https://review.typo3.org/51342 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> --- typo3/sysext/core/Classes/DataHandling/DataHandler.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/core/Classes/DataHandling/DataHandler.php b/typo3/sysext/core/Classes/DataHandling/DataHandler.php index de95dab7416c..563c2fd96df1 100644 --- a/typo3/sysext/core/Classes/DataHandling/DataHandler.php +++ b/typo3/sysext/core/Classes/DataHandling/DataHandler.php @@ -8074,7 +8074,12 @@ class DataHandler */ public function noRecordsFromUnallowedTables($inList) { - $inList = trim($this->rmComma(trim($inList))); + if (strpos($inList, ',') !== false) { + $pids = GeneralUtility::intExplode(',', $inList, true); + } else { + $inList = trim($this->rmComma(trim($inList))); + $pids = [$inList]; + } if ($inList && !$this->admin) { foreach ($GLOBALS['TCA'] as $table => $_) { $query = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table); @@ -8085,7 +8090,7 @@ class DataHandler ->from($table) ->where($query->expr()->in( 'pid', - $query->createNamedParameter($inList, Connection::PARAM_INT_ARRAY) + $query->createNamedParameter($pids, Connection::PARAM_INT_ARRAY) )) ->execute() ->fetchColumn(0); -- GitLab