Skip to content

Commit 17d700d

Browse files
committed
fix: resolve syntax error and method names for escapeIdentifiers bypass
1 parent f77f073 commit 17d700d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎system/Database/BaseConnection.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,7 +1281,7 @@ public function protectIdentifiers($item, bool $prefixSingle = false, ?bool $pro
12811281
// Added exception for single quotes as well, we don't want to alter
12821282
// literal strings.
12831283
if (strcspn($item, "()'") !== strlen($item)) {
1284-
if ($this->isSafeToBypassEscape($item)) {
1284+
if ($this->isIdentifierEscapeExempt($item)) {
12851285
return $item;
12861286
}
12871287
}
@@ -1437,7 +1437,7 @@ public function escapeIdentifier($item): string
14371437
/**
14381438
* Checks if an identifier with parentheses or quotes is a safe function call or a string literal.
14391439
*/
1440-
private function isIdentifierEscapeExempt()(string $item): bool
1440+
private function isIdentifierEscapeExempt(string $item): bool
14411441
{
14421442
$item = trim($item);
14431443

@@ -1500,7 +1500,7 @@ public function escapeIdentifiers($item)
15001500
return $item;
15011501
}
15021502

1503-
if (ctype_digit($item) || $this->isSafeToBypassEscape($item)) {
1503+
if (ctype_digit($item) || $this->isIdentifierEscapeExempt($item)) {
15041504
return $item;
15051505
}
15061506

0 commit comments

Comments
 (0)