Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

foxy

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

foxy - npm Package Compare versions

Comparing version 11.1.3 to 11.1.4

45

lib/utils.js

@@ -1,6 +0,5 @@

"use stict";
"use strict";
var url = require("url");
var path = require("path");
var cookie = require("cookie");
var excludeList = require("./exclude");

@@ -39,18 +38,30 @@ var utils = exports;

var parsed = cookie.parse(rawCookie, {
decode: function(val) {
// Prevent values from being decodeURIComponent transformed
return val;
}
});
var objCookie = (function () {
// simple parse function (does not remove quotes)
var obj = {};
var pairs = rawCookie.split(/; */);
var pairs =
Object.keys(parsed)
.filter(function (item) {
return item !== "domain";
})
.map(function (key) {
return key + "=" + parsed[key];
});
pairs.forEach( function( pair ) {
var eqIndex = pair.indexOf("=");
// skip things that don't look like key=value
if (eqIndex < 0) {
return;
}
var key = pair.substr(0, eqIndex).trim();
obj[key] = pair.substr(eqIndex + 1, pair.length).trim();
});
return obj;
})();
var pairs = Object.keys(objCookie)
.filter(function (item) {
return item !== "domain";
})
.map(function (key) {
return key + "=" + objCookie[key];
});
if (rawCookie.match(/httponly/i)) {

@@ -244,2 +255,2 @@ pairs.push("HttpOnly");

};
};
};
{
"name": "foxy",
"version": "11.1.3",
"version": "11.1.4",
"description": "Proxy with response modding",

@@ -29,3 +29,2 @@ "main": "index.js",

"connect": "^3.3.5",
"cookie": "^0.1.3",
"dev-ip": "^1.0.1",

@@ -40,2 +39,3 @@ "eazy-logger": "^2.0.0",

"babel": "^4.7.16",
"cookie": "^0.1.3",
"browser-sync": "^2.3.1",

@@ -42,0 +42,0 @@ "chai": "^2.1.2",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc