mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-08-05 17:28:06 +02:00
Fix possible SQL injection in file tags search
This commit is contained in:
parent
70ce81c01a
commit
95422f71ba
1 changed files with 1 additions and 1 deletions
|
@ -548,7 +548,7 @@ module.exports = class FileEntry {
|
|||
|
||||
if(filter.tags && filter.tags.length > 0) {
|
||||
// build list of quoted tags; filter.tags comes in as a space and/or comma separated values
|
||||
const tags = filter.tags.replace(/,/g, ' ').replace(/\s{2,}/g, ' ').split(' ').map( tag => `"${tag}"` ).join(',');
|
||||
const tags = filter.tags.replace(/,/g, ' ').replace(/\s{2,}/g, ' ').split(' ').map( tag => `"${sanatizeString(tag)}"` ).join(',');
|
||||
|
||||
appendWhereClause(
|
||||
`f.file_id IN (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue