🔒 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:
parent
831d350653
commit
ed33718ddf
1 changed files with 4 additions and 0 deletions
|
@ -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'"
|
||||
|
|
Loading…
Add table
Reference in a new issue