Last active
December 24, 2023 16:02
-
-
Save mcsee/820585e06dad19fde4cddd17d357a473 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
private function addTerms(string $SQLselect) { | |
$selectSentence = $this->createSqlWhere(); | |
// INJECTED CODE | |
$simplifiedTerms = | |
(new LikePatternSimplifier())->simplify($this->texts()); | |
// INJECTED CODE | |
foreach ($simplifiedTerms as $text) { | |
$selectSentence->addWhere( | |
$this->tableAlias() . | |
" LIKE '%" . | |
$this->sanitize($text) . | |
"%'"); | |
} | |
$SQLselect->addWhere($selectSentence->asSQLSentence()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment