decodeURIComponent-catch-e
Showing
1 changed file
with
6 additions
and
1 deletions
@@ -344,7 +344,12 @@ const listNew = (req, res, next) => { | @@ -344,7 +344,12 @@ const listNew = (req, res, next) => { | ||
344 | } | 344 | } |
345 | 345 | ||
346 | if (params.sort_name) { | 346 | if (params.sort_name) { |
347 | - seoTitle = decodeURIComponent(params.sort_name); | 347 | + try { |
348 | + seoTitle = decodeURIComponent(params.sort_name); | ||
349 | + } catch (e) { | ||
350 | + logger.error('decodeURIComponent seoTitle: ' + e); | ||
351 | + return res.redirect('/'); | ||
352 | + } | ||
348 | } | 353 | } |
349 | 354 | ||
350 | try { | 355 | try { |
-
Please register or login to post a comment