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
Merged

Conversation

minrk
Copy link
Member

@minrk 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
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
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.
rather than the module name as str

and use `hmac.new` API from the docs, rather than undocumented class constructor
@takluyver takluyver added this to the 5.5 milestone Mar 7, 2018
@takluyver takluyver merged commit 290e574 into jupyter:master Mar 7, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants