🔒 SQL injection security vulnerabilities https://github.com/siyuan-note/siyuan/issues/13077 https://github.com/siyuan-note/siyuan/issues/13057
This commit is contained in:
parent
ed33718ddf
commit
06c39771ce
1 changed files with 7 additions and 0 deletions
|
@ -448,6 +448,13 @@ func FullTextSearchHistoryItems(created, query, box, op string, typ int) (ret []
|
|||
table := "histories_fts_case_insensitive"
|
||||
stmt := "SELECT * FROM " + table + " WHERE "
|
||||
stmt += buildSearchHistoryQueryFilter(query, op, box, table, typ)
|
||||
|
||||
_, parseErr := strconv.Atoi(created)
|
||||
if nil != parseErr {
|
||||
ret = []*HistoryItem{}
|
||||
return
|
||||
}
|
||||
|
||||
stmt += " AND created = '" + created + "' ORDER BY created DESC LIMIT " + fmt.Sprintf("%d", fileHistoryPageSize)
|
||||
sqlHistories := sql.SelectHistoriesRawStmt(stmt)
|
||||
ret = fromSQLHistories(sqlHistories)
|
||||
|
|
Loading…
Add table
Reference in a new issue