In lib/response.js in res.cookie() some assumptions are made that the incoming maxAge option will always be a number. However, if maxAge is set to undefined through some process, opts.maxAge /= 1000 returns NaN. maxAge should be verified and/or coerced to be numeric.
In
lib/response.jsinres.cookie()some assumptions are made that the incomingmaxAgeoption will always be a number. However, ifmaxAgeis set toundefinedthrough some process,opts.maxAge /= 1000returnsNaN.maxAgeshould be verified and/or coerced to be numeric.