fix: issue with non-alphanumeric characters within body env variables (fixes #2665)

This commit is contained in:
Andrew Bastin
2022-10-03 14:51:10 +05:30
parent 355e37a27d
commit 3c35bb6091
6 changed files with 8 additions and 8 deletions

View File

@@ -35,7 +35,7 @@
"@codemirror/state": "^6.1.0",
"@codemirror/view": "^6.0.2",
"@hoppscotch/codemirror-lang-graphql": "workspace:^0.2.0",
"@hoppscotch/data": "workspace:^0.4.2",
"@hoppscotch/data": "workspace:^0.4.4",
"@hoppscotch/js-sandbox": "workspace:^2.1.0",
"@hoppscotch/vue-toasted": "^0.1.0",
"@lezer/highlight": "^1.0.0",

View File

@@ -36,7 +36,7 @@
"license": "MIT",
"private": false,
"devDependencies": {
"@hoppscotch/data": "workspace:^0.4.3",
"@hoppscotch/data": "workspace:^0.4.4",
"@hoppscotch/js-sandbox": "workspace:^2.0.0",
"@relmify/jest-fp-ts": "^2.0.2",
"@swc/core": "^1.2.181",

View File

@@ -1,6 +1,6 @@
{
"name": "@hoppscotch/data",
"version": "0.4.3",
"version": "0.4.4",
"description": "Data Types, Validations and Migrations for Hoppscotch Public Data Structures",
"type": "module",
"main": "dist/hoppscotch-data.cjs",

View File

@@ -30,7 +30,7 @@ export function parseBodyEnvVariablesE(
let depth = 0
while (result.match(REGEX_ENV_VAR) != null && depth <= ENV_MAX_EXPAND_LIMIT) {
result = result.replace(/<<\w+>>/g, (key) => {
result = result.replace(REGEX_ENV_VAR, (key) => {
const found = env.find(
(envVar) => envVar.key === key.replace(/[<>]/g, "")
)

View File

@@ -40,7 +40,7 @@
"author": "Hoppscotch (support@hoppscotch.io)",
"license": "MIT",
"dependencies": {
"@hoppscotch/data": "workspace:^0.4.3",
"@hoppscotch/data": "workspace:^0.4.4",
"fp-ts": "^2.11.10",
"lodash": "^4.17.21",
"quickjs-emscripten": "^0.15.0",