expressjs / cookie-parser

Parse HTTP request cookies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support ignoring signed cookies, when no secret provided

srlowe opened this issue · comments

I'm using cookie parser in a situation where there are both signed and unsigned cookies in the request. If cookie-parser is put in the stack without the secret option, and the request contains a signed cookie, then this will throw an error.

IMO it would be better to simply ignore signed cookies when there is no secret provided, so that unsigned cookies could still be parsed. (Or an option for this).

As far as I know, the current version of this module works just like you want (see the tests). Are you using the latest version? What is the exact error with stack trace you are getting?

Yes you're right. There was something else going on with the app code which was causing it. Sorry for wasting your time.

lol. It's no problem to help; without reports, it's hard to know when there are issues :) You didn't waste my time at all.