Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing digestmod arg to HMAC #3399

Merged
merged 2 commits into from Mar 7, 2018

Conversation

Projects
None yet
2 participants
@minrk
Copy link
Member

minrk commented Mar 5, 2018

Noticed in test output that creating HMAC without digestmod arg is deprecated.

While there, use proper length of 32 bytes for default tornado cookie_secret. There’s no benefit to using a cookie secret that's longer that the cookie digest size, which is 32 bytes.

@minrk

This comment has been minimized.

Copy link
Member Author

minrk commented Mar 5, 2018

Based on #3398 since tests won't pass until that lands rebased after merge of #3398.

@minrk minrk changed the title add missing digestmod='sha256' in cookie_secret Noticed in test output that creating HMAC without digestmod arg is deprecated. add missing digestmod='sha256' in cookie_secret Mar 5, 2018

@minrk minrk changed the title add missing digestmod='sha256' in cookie_secret add missing digestmod arg to HMAC Mar 5, 2018

@minrk minrk force-pushed the minrk:hmac-deprecated branch from 8d9b73f to 78dfc7a Mar 5, 2018

minrk added some commits Mar 5, 2018

add missing digestmod='sha256' in cookie_secret
Noticed in test output that creating HMAC without digestmod arg is deprecated.

While there, use proper length of 32 bytes for default tornado cookie_secret. There’s no benefit to using a cookie secret that's longer that the cookie digest size, which is 32 bytes.
python2 requires digestmod to be the module
rather than the module name as str

and use `hmac.new` API from the docs, rather than undocumented class constructor

@minrk minrk force-pushed the minrk:hmac-deprecated branch from 78dfc7a to f16b073 Mar 5, 2018

@takluyver takluyver added this to the 5.5 milestone Mar 7, 2018

@takluyver takluyver merged commit 290e574 into jupyter:master Mar 7, 2018

4 checks passed

codecov/patch 100% of diff hit (target 0%)
Details
codecov/project 77.71% (+0%) compared to ae1f167
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.