Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
Add escaping for bad platform string.
Browse files Browse the repository at this point in the history
  • Loading branch information
rastiqdev committed Jun 21, 2023
1 parent d613496 commit d9d3f42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/nuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,9 @@ Nuts.prototype.onUpdateRedirect = function (req, res, next) {
if (!req.query.platform) throw new Error('Requires "platform" parameter');

return res.redirect(
`${that.opts.routePrefix}update/${req.query.platform}/${req.query.version}`
`${that.opts.routePrefix}update/${_.escape(req.query.platform)}/${
req.query.version
}`
);
})
.fail(next);
Expand Down

0 comments on commit d9d3f42

Please sign in to comment.