-
-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I have a suggestion: It should be possible to sign (/ apply HMAC) to cache values in the same way werkzeug.contrib.securecookie does already.
pickle is used as serializer to serialize the content. While this is absolutely fine as long nobody can access the underlying cache back end (Redis, FS, Memcached), it may allow privilege escalation once an attacker gains access to it, as pickle allows to store arbitrary code.
Proposal:
- Add a warning to the documentation.
- Add the option pass a signing key to sign the results and raise a warning if no signing key is passed at initialization.
- Deprecate not using a signing key and ultimately enforce using one.
Practically pallets' ItsDangerous could be used here.
If wanted, I can create a pull request implementing my proposal.
mutantmonkey and stijn-squla
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request