jvanasco / pyramid_session_redis

This is an extensive fork with large rewrites and functionality changes. originally ericrasmussen/pyramid_redis_sessions
Other
16 stars 11 forks source link

Replace use of MD5 in session.py #53

Open akurtz-penguin opened 2 years ago

akurtz-penguin commented 2 years ago

session.hashed_value uses hashlib.md5

While this MD5 usage isn't security related, MD5 usage is deprecated. It triggers security warnings for scanners, and isn't available in FIPS environment.

The easiest solution would be to use a different algorithm, such as SHA256 or SHA512.

jvanasco commented 2 years ago

I'm open to PRs that would allow this to be configurable by end-users, but I don't foresee myself supporting this anytime soon. That would address your concern with support for people using FIPs libraries.

This package does a lot to eke out as much performance and as small a footprint as possible. Potentially, only a substring of a larger digest could be used, but I still have reservations. Right now, dropping MD5 is off the table.

Quickly looking at the code for a refresher:

What I'm comfortable with right now: