Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
HyperpotamusCookieStore.prototype.findCookies = function (domain, path, cb) {
var idx = this.idx;
MemoryCookieStore.prototype.findCookies.call(this, domain, path, function (err, results) {
if (err) {
return cb(err);
}
var domainIndex = idx["*"];
if (domainIndex) {
if (!path) {
// null means "all paths"
for (var curPath in domainIndex) {
var pathIndex = domainIndex[curPath];
for (var key in pathIndex) {
results.push(_.defaults({ domain }, _.clone(pathIndex[key])));
}
}
}
else {