cookie-encrypter icon indicating copy to clipboard operation
cookie-encrypter copied to clipboard

Transparently encrypt/decrypt your cookie with Nodejs

Results 4 cookie-encrypter issues
Sort by recently updated
recently updated
newest added

The Readme says `secret` can be "a string or array used for encrypting cookies.". But the code doesn't handle arrays so fails here: ``` if (algorithm === 'aes256' && key.length...

If I am not completely mistaken the encryption lacks a proper randomization and therefore is susceptible to a replay attack. Who would prevent an attacker from intercepting an encrypted cookie...

In order to reduce the number of bytes used in the cookie, I had to use a different encoding. Maybe other people have similar issues when the cookie content grows...

# cookie-encrypter Vulnerability Let's imagine a website with the following source code: ```js const express = require('express'); const cookieParser = require('cookie-parser'); const cookieEncrypter = require('cookie-encrypter'); const app = express(); app.use(cookieParser("NicePasswordHereItIsAGoodSecret!"));...