mirror of
https://github.com/FriendsOfTYPO3/feedit.git
synced 2024-11-09 17:26:09 +01:00
[TASK] Use strict comparison for strings
Change string comparison for string checks. Checks which could lead to false positives like comparing with '0' or '' are excluded. RegEx used to find affected places: (?<=\s)((?:!|=)=)(?=[^=]'[^0-9'\n]+') Resolves: #79540 Resolves: master Change-Id: I9a04bdd9e0e78cc97036560709bb505097bf48f9 Reviewed-on: https://review.typo3.org/51462 Reviewed-by: Markus Klein <markus.klein@typo3.org> Tested-by: Markus Klein <markus.klein@typo3.org> Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de> Reviewed-by: Benni Mack <benni@typo3.org> Tested-by: Benni Mack <benni@typo3.org>
This commit is contained in:
parent
05068ee910
commit
c75e9667e6
1 changed files with 4 additions and 4 deletions
|
@ -233,7 +233,7 @@ class FrontendEditPanel
|
||||||
} elseif ($conf['beforeLastTag'] > 0) {
|
} elseif ($conf['beforeLastTag'] > 0) {
|
||||||
$cBuf = rtrim($content);
|
$cBuf = rtrim($content);
|
||||||
$secureCount = 30;
|
$secureCount = 30;
|
||||||
while ($secureCount && substr($cBuf, -1) == '>' && substr($cBuf, -4) != '</a>') {
|
while ($secureCount && substr($cBuf, -1) === '>' && substr($cBuf, -4) !== '</a>') {
|
||||||
$cBuf = rtrim(preg_replace('/<[^<]*>$/', '', $cBuf));
|
$cBuf = rtrim(preg_replace('/<[^<]*>$/', '', $cBuf));
|
||||||
$secureCount--;
|
$secureCount--;
|
||||||
}
|
}
|
||||||
|
@ -259,12 +259,12 @@ class FrontendEditPanel
|
||||||
protected function editPanelLinkWrap($string, $formName, $cmd, $currentRecord = '', $confirm = '', $nPid = '')
|
protected function editPanelLinkWrap($string, $formName, $cmd, $currentRecord = '', $confirm = '', $nPid = '')
|
||||||
{
|
{
|
||||||
$nV = GeneralUtility::_GP('ADMCMD_view') ? 1 : 0;
|
$nV = GeneralUtility::_GP('ADMCMD_view') ? 1 : 0;
|
||||||
if ($cmd == 'edit') {
|
if ($cmd === 'edit') {
|
||||||
$rParts = explode(':', $currentRecord);
|
$rParts = explode(':', $currentRecord);
|
||||||
$out = $this->editPanelLinkWrap_doWrap($string, BackendUtility::getModuleUrl('record_edit', ['edit[' . $rParts[0] . '][' . $rParts[1] . ']' => 'edit', 'noView' => $nV, 'feEdit' => 1]), $currentRecord);
|
$out = $this->editPanelLinkWrap_doWrap($string, BackendUtility::getModuleUrl('record_edit', ['edit[' . $rParts[0] . '][' . $rParts[1] . ']' => 'edit', 'noView' => $nV, 'feEdit' => 1]), $currentRecord);
|
||||||
} elseif ($cmd == 'new') {
|
} elseif ($cmd === 'new') {
|
||||||
$rParts = explode(':', $currentRecord);
|
$rParts = explode(':', $currentRecord);
|
||||||
if ($rParts[0] == 'pages') {
|
if ($rParts[0] === 'pages') {
|
||||||
$out = $this->editPanelLinkWrap_doWrap($string, BackendUtility::getModuleUrl('db_new', ['id' => $rParts[1], 'pagesOnly' => 1]), $currentRecord);
|
$out = $this->editPanelLinkWrap_doWrap($string, BackendUtility::getModuleUrl('db_new', ['id' => $rParts[1], 'pagesOnly' => 1]), $currentRecord);
|
||||||
} else {
|
} else {
|
||||||
if (!(int)$nPid) {
|
if (!(int)$nPid) {
|
||||||
|
|
Loading…
Reference in a new issue