mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 00:45:47 +01:00
make sure validator.escape() receives strings only
This commit is contained in:
@@ -34,7 +34,7 @@ search.search = function(data, callback) {
|
||||
}
|
||||
},
|
||||
function (result, next) {
|
||||
result.search_query = validator.escape(data.query || '');
|
||||
result.search_query = validator.escape(String(data.query || ''));
|
||||
result.time = (process.elapsedTimeSince(start) / 1000).toFixed(2);
|
||||
next(null, result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user