Skip to content

AES encrypt/decrypt does not validate input length #61

@ianpartridge

Description

@ianpartridge

Reported by @Lukasa

It seems you have a risk of generating encrypted cookies that you cannot decrypt.
Specifically, CookieCryptography.decode just assumes that the original input was only 36 bytes long. However, CookieCryptography.encrypt does not actually check that.
So you have a risk of getting garbage output.
Is there any reason you aren't just using PKCS7 padding? It seems to be supported by BlueCryptor.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions