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

digestmod parameter is now required since Python 3.8 #1181

Closed
octave21 opened this issue Nov 29, 2019 · 2 comments
Closed

digestmod parameter is now required since Python 3.8 #1181

octave21 opened this issue Nov 29, 2019 · 2 comments

Comments

@octave21
Copy link

Since python 3.8, digestmod parameter is now required.

from hmac.new Python documentation : "Deprecated since version 3.4, will be removed in version 3.8: MD5 as implicit default digest for digestmod is deprecated. The digestmod parameter is now required. Pass it as a keyword argument to avoid awkwardness when you do not have an initial msg."

In bottle. py 0.12.17 I made two patchs by adding "MD5" :

  • line 2600 sig = base64.b64encode(hmac.new(tob(key), msg, "MD5").digest()) # PATCH JFC
  • line 2609 if _lscmp(sig[1:], base64.b64encode(hmac.new(tob(key), msg, "MD5").digest())): # PATCH JFC

And it's working for me :-)

@defnull
Copy link
Member

defnull commented Dec 1, 2019

Should be fixed with 0.12.18

@defnull defnull closed this as completed Dec 1, 2019
@octave21
Copy link
Author

octave21 commented Dec 1, 2019

Thanks

kraj pushed a commit to kraj/buildroot that referenced this issue Feb 4, 2021
Fixes the following security issue:

CVE-2020-28473: The package bottle from 0 and before 0.12.19 are vulnerable
to Web Cache Poisoning by using a vector called parameter cloaking.  When
the attacker can separate query parameters using a semicolon (;), they can
cause a difference in the interpretation of the request between the proxy
(running with default configuration) and the server.  This can result in
malicious requests being cached as completely safe ones, as the proxy would
usually not see the semicolon as a separator, and therefore would not
include it in a cache key of an unkeyed parameter.

In addition, bottle 0.12.18 fixed a compatibility issue with python 3.8+:

bottlepy/bottle#1181

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
buildroot-auto-update pushed a commit to buildroot/buildroot that referenced this issue Feb 10, 2021
Fixes the following security issue:

CVE-2020-28473: The package bottle from 0 and before 0.12.19 are vulnerable
to Web Cache Poisoning by using a vector called parameter cloaking.  When
the attacker can separate query parameters using a semicolon (;), they can
cause a difference in the interpretation of the request between the proxy
(running with default configuration) and the server.  This can result in
malicious requests being cached as completely safe ones, as the proxy would
usually not see the semicolon as a separator, and therefore would not
include it in a cache key of an unkeyed parameter.

In addition, bottle 0.12.18 fixed a compatibility issue with python 3.8+:

bottlepy/bottle#1181

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 14cc349)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
buildroot-auto-update pushed a commit to buildroot/buildroot that referenced this issue Feb 10, 2021
Fixes the following security issue:

CVE-2020-28473: The package bottle from 0 and before 0.12.19 are vulnerable
to Web Cache Poisoning by using a vector called parameter cloaking.  When
the attacker can separate query parameters using a semicolon (;), they can
cause a difference in the interpretation of the request between the proxy
(running with default configuration) and the server.  This can result in
malicious requests being cached as completely safe ones, as the proxy would
usually not see the semicolon as a separator, and therefore would not
include it in a cache key of an unkeyed parameter.

In addition, bottle 0.12.18 fixed a compatibility issue with python 3.8+:

bottlepy/bottle#1181

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 14cc349)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants