fix: decodeURI() failing on malformated URI + chore(deps): bump

This commit is contained in:
Liyas Thomas
2020-12-29 07:13:46 +05:30
parent 353978f115
commit 9ac0cf1406
5 changed files with 18 additions and 18 deletions

View File

@@ -1815,7 +1815,7 @@ export default {
if (typeof queries !== "object") throw new Error("Route query parameters must be a Object")
for (const key in queries) {
if (["headers", "params", "bodyParams"].includes(key))
this[key] = JSON.parse(decodeURI(queries[key]))
this[key] = JSON.parse(decodeURI(encodeURI(queries[key])))
if (key === "rawParams") {
this.rawInput = true
this.rawParams = queries["rawParams"]