mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-07-03 14:09:06 +02:00
🔒 SQL injection security vulnerabilities https://github.com/siyuan-note/siyuan/issues/13077 https://github.com/siyuan-note/siyuan/issues/13058
This commit is contained in:
@@ -473,6 +473,10 @@ func buildSearchHistoryQueryFilter(query, op, box, table string, typ int) (stmt
|
||||
stmt += " AND op = '" + op + "'"
|
||||
}
|
||||
|
||||
if "%" != box && !ast.IsNodeIDPattern(box) {
|
||||
box = "%"
|
||||
}
|
||||
|
||||
if HistoryTypeDocName == typ || HistoryTypeDoc == typ || HistoryTypeDocID == typ {
|
||||
if HistoryTypeDocName == typ || HistoryTypeDoc == typ {
|
||||
stmt += " AND path LIKE '%/" + box + "/%' AND path LIKE '%.sy'"
|
||||
|
||||
Reference in New Issue
Block a user