Skip to content

Commit 6271cb2

Browse files
committed
Escape special characters in filter value for improved SQL query safety
1 parent 54807c3 commit 6271cb2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

wcfsetup/install/files/lib/system/condition/type/user/AbstractUserStringConditionType.class.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ public function getLabel(): string
6262
public function applyFilter(DatabaseObjectList $objectList): void
6363
{
6464
["condition" => $condition, "value" => $value] = $this->filter;
65+
$value = \addcslashes($value, '_%');
66+
6567
$filter = match ($condition) {
6668
"_%" => $value . '%',
6769
"%_%" => '%' . $value . '%',

0 commit comments

Comments
 (0)