Skip to content

Commit 8a99f6c

Browse files
authored
fix(core): shortlink exploit (#1829)
* fix(core): shortlink exploit * bump
1 parent 3278fcb commit 8a99f6c

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

build/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "botpress",
3-
"version": "12.31.7",
3+
"version": "12.31.8",
44
"description": "The world's most powerful conversational engine",
55
"main": "index.js",
66
"bin": "index.js",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bp_main",
3-
"version": "12.31.7",
3+
"version": "12.31.8",
44
"description": "The world's most powerful conversational engine",
55
"engines": {
66
"node": "^12"

packages/bp/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "botpress",
3-
"version": "12.31.7",
3+
"version": "12.31.8",
44
"description": "The world's most powerful conversational engine",
55
"engines": {
66
"node": "^12"

packages/bp/src/core/routers/shortlinks.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export class ShortLinksRouter extends CustomRouter {
1919
let link = name && this.shortlinks.get(name)
2020

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

2526
const query = qs.stringify(req.query)

0 commit comments

Comments
 (0)