Merge pull request #18334 from kamil-tekiela/18333

Cast POST values to expected types
This commit is contained in:
Maurício Meneghini Fauth 2023-04-09 14:18:54 -03:00 committed by GitHub
commit cf114bfc6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 8 deletions

View File

@ -146,7 +146,7 @@ class FindReplaceController extends AbstractController
&& $_POST['useRegex'] === 'on';
$preview = $this->getReplacePreview(
$_POST['columnIndex'],
(int) $_POST['columnIndex'],
$_POST['find'],
$_POST['replaceWith'],
$useRegex,
@ -158,10 +158,10 @@ class FindReplaceController extends AbstractController
public function replaceAction(): void
{
$this->replace(
$_POST['columnIndex'],
(int) $_POST['columnIndex'],
$_POST['findString'],
$_POST['replaceWith'],
$_POST['useRegex'],
(bool) $_POST['useRegex'],
$this->connectionCharSet,
);
$this->response->addHTML(

View File

@ -3591,11 +3591,6 @@
<InvalidArrayOffset>
<code><![CDATA[$GLOBALS['errorUrl']]]></code>
</InvalidArrayOffset>
<InvalidScalarArgument>
<code><![CDATA[$_POST['columnIndex']]]></code>
<code><![CDATA[$_POST['columnIndex']]]></code>
<code><![CDATA[$_POST['useRegex']]]></code>
</InvalidScalarArgument>
<MixedArgument>
<code>$column</code>
<code>$column</code>
@ -3641,6 +3636,10 @@
<PossiblyUnusedParam>
<code>$request</code>
</PossiblyUnusedParam>
<RiskyCast>
<code><![CDATA[$_POST['columnIndex']]]></code>
<code><![CDATA[$_POST['columnIndex']]]></code>
</RiskyCast>
</file>
<file src="libraries/classes/Controllers/Table/GetFieldController.php">
<PossiblyInvalidArgument>