Skip to content

digestmod parameter is now required since Python 3.8 #1181

@octave21

Description

@octave21

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 :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions