]> source.dussan.org Git - nextcloud-server.git/commitdiff
Properly escape underscore in db query 34569/head
authorCarl Schwan <carl@carlschwan.eu>
Thu, 13 Oct 2022 16:50:36 +0000 (18:50 +0200)
committerGitHub <noreply@github.com>
Thu, 13 Oct 2022 16:50:36 +0000 (18:50 +0200)
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
apps/user_status/lib/Db/UserStatusMapper.php

index cb7ad5392db830ecae047d08799071c6d348b231..d40c6a298605032a3c58544195b7125394500ce5 100644 (file)
@@ -83,7 +83,7 @@ class UserStatusMapper extends QBMapper {
                                        $qb->expr()->isNotNull('custom_icon'),
                                        $qb->expr()->isNotNull('custom_message'),
                                ),
-                               $qb->expr()->notLike('user_id', $qb->createNamedParameter('\_%'))
+                               $qb->expr()->notLike('user_id', $qb->createNamedParameter($this->db->escapeLikeParameter('_') . '%'))
                        ));
 
                if ($limit !== null) {