Skip to content

Commit 98b4717

Browse files
fix(backend): SQLのサニタイズを強化 (#14920)
* Fix code scanning alert no. 28: Incomplete string escaping or encoding (MisskeyIO#800) Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> (cherry picked from commit 443335c) * ✌️ --------- Co-authored-by: あわわわとーにゅ <17376330+u1-liquid@users.noreply.github.com>
1 parent 8a4ce16 commit 98b4717

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/backend/src/misc/sql-like-escape.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
*/
55

66
export function sqlLikeEscape(s: string) {
7-
return s.replace(/([%_])/g, '\\$1');
7+
return s.replace(/([\\%_])/g, '\\$1');
88
}

0 commit comments

Comments
 (0)