-
-
Notifications
You must be signed in to change notification settings - Fork 158
this.keys but no opts means cookies don't get signed #53
Copy link
Copy link
Open
Description
In Cookie.prototype.set (https://github.com/expressjs/cookies/blob/2dcb71f130a7eaafd16e71b9af70debe11d4c93f/lib/cookies.js#L69), the signed variable is true if opts.signed or this.keys is truthy. However, the check for whether to sign keys or not also checks if opts exists.
This means that if this.keys is truthy, but opts is undefined, the signed variable will be true but the key still won't be signed. My expectation is they key should be signed if signed == true, and it shouldn't depend on the existence of opts.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels