Skip to content

Commit

Permalink
Make bad cookie logic more obvious on what it is checking for
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmcq committed May 25, 2018
1 parent e25d725 commit 1730d38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cookiejar.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

var key = pair[1];
var value = pair[2];
if (!key || !value) {
if ( typeof key !== 'string' || key.length === 0 || typeof value !== 'string' ) {
console.warn("Unable to extract values from cookie header. Cookie: '"+str+"'");
return;
}
Expand Down

0 comments on commit 1730d38

Please sign in to comment.