Commit f0992162f00aa0240c48632a050178ebe7c24ee6
1 parent
0f3eba15c0
Exists in
master
no trim on log
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
lib/apiserver/routers/smstools.js
... | ... | @@ -30,7 +30,7 @@ async function pageRestart(req, res) { |
30 | 30 | |
31 | 31 | function pageLog(req, res) { |
32 | 32 | const maxLines = (Number(req.query.max) || 200); |
33 | - const keyword = req.query.keyword && req.query.keyword.trim() && escapeQuotes(req.query.keyword.trim(), '"&|*<>[];$'); | |
33 | + const keyword = req.query.keyword && escapeQuotes(req.query.keyword, '"&|*<>[];$'); | |
34 | 34 | const cmd = req.query.keyword ? `tail -n ${maxLines * 50} | grep ${keyword} | tail -n ${maxLines} | tac` |
35 | 35 | : `tail -n ${maxLines} /var/log/smsd/smsd.log | tac`; |
36 | 36 |