mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
Fixed rendering potentially unsafe values
This commit is contained in:
parent
bb0ed87ca7
commit
2e5b28cf67
@ -153,6 +153,9 @@ export function _actuallySend (renderedRequest, workspace, settings, forceIPv4 =
|
||||
jar._jar = jarFromCookies(cookieJar.cookies);
|
||||
config.jar = jar;
|
||||
|
||||
// Set the IP family. This fallback behaviour is copied from Curl
|
||||
config.family = forceIPv4 ? 4 : 6;
|
||||
|
||||
config.callback = async (err, networkResponse) => {
|
||||
if (err) {
|
||||
const isShittyParseError = err.toString() === 'Error: Parse Error';
|
||||
@ -216,9 +219,6 @@ export function _actuallySend (renderedRequest, workspace, settings, forceIPv4 =
|
||||
models.response.create(responsePatch).then(resolve, reject);
|
||||
};
|
||||
|
||||
// Set the IP family. This fallback behaviour is copied from Curl
|
||||
config.family = forceIPv4 ? 4 : 6;
|
||||
|
||||
const requestStartTime = Date.now();
|
||||
const req = new networkRequest.Request(config);
|
||||
|
||||
|
@ -86,10 +86,7 @@ export function buildRenderContext (ancestors, rootEnvironment, subEnvironment)
|
||||
|
||||
// Now we're going to render the renderContext with itself.
|
||||
// This is to support templating inside environments
|
||||
const stringifiedEnvironment = JSON.stringify(renderContext);
|
||||
return JSON.parse(
|
||||
render(stringifiedEnvironment, renderContext)
|
||||
)
|
||||
return recursiveRender(renderContext, renderContext);
|
||||
}
|
||||
|
||||
export function recursiveRender (obj, context) {
|
||||
|
@ -505,7 +505,7 @@ function createWindow () {
|
||||
{
|
||||
label: "Insomnia Help",
|
||||
accelerator: "CmdOrCtrl+?",
|
||||
click: (e) => {
|
||||
click: () => {
|
||||
trackEvent('App Menu', 'Help');
|
||||
shell.openExternal('https://insomnia.rest/documentation');
|
||||
}
|
||||
|
@ -17,7 +17,10 @@ export function init () {
|
||||
export function migrate (doc) {
|
||||
// There was a bug on import that would set this to the current workspace ID.
|
||||
// Let's remove it here so that nothing bad happens.
|
||||
doc.parentId = null;
|
||||
if (doc.parentId !== null) {
|
||||
// Save it to the DB for this one
|
||||
process.nextTick(() => update(doc, {parentId: null}));
|
||||
}
|
||||
|
||||
return doc;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "insomnia",
|
||||
"version": "4.0.5",
|
||||
"version": "4.0.7",
|
||||
"productName": "Insomnia",
|
||||
"longName": "Insomnia REST Client",
|
||||
"description": "A simple and beautiful REST API client",
|
||||
|
Loading…
Reference in New Issue
Block a user