Skip to content

Commit

Permalink
fix(core): shortlink exploit (#1829)
Browse files Browse the repository at this point in the history
* fix(core): shortlink exploit

* bump
  • Loading branch information
davidvitora committed May 15, 2024
1 parent 3278fcb commit 8a99f6c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "botpress",
"version": "12.31.7",
"version": "12.31.8",
"description": "The world's most powerful conversational engine",
"main": "index.js",
"bin": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bp_main",
"version": "12.31.7",
"version": "12.31.8",
"description": "The world's most powerful conversational engine",
"engines": {
"node": "^12"
Expand Down
2 changes: 1 addition & 1 deletion packages/bp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "botpress",
"version": "12.31.7",
"version": "12.31.8",
"description": "The world's most powerful conversational engine",
"engines": {
"node": "^12"
Expand Down
3 changes: 2 additions & 1 deletion packages/bp/src/core/routers/shortlinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export class ShortLinksRouter extends CustomRouter {
let link = name && this.shortlinks.get(name)

if (!link) {
return res.status(404).send(`Shortlink "${name}" not registered`)
// Sanatize name
return res.status(404).send(`Shortlink "${name.replace(/</g, '&lt;').replace(/>/g, '&gt;')}" not registered`)
}

const query = qs.stringify(req.query)
Expand Down

0 comments on commit 8a99f6c

Please sign in to comment.