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

LoginManager fails because of Werkzeug dependency #636

Closed
frank1010111 opened this issue Mar 28, 2022 · 6 comments
Closed

LoginManager fails because of Werkzeug dependency #636

frank1010111 opened this issue Mar 28, 2022 · 6 comments

Comments

@frank1010111
Copy link

After Werkzeug updated to v 2.1.0, LoginManager cannot import werkzeug.security.safe_str_cmp. This is because Werkzeug has removed several deprecated code elements (see pallets/werkzeug#2276). The Werkzeug changelog suggests using hashlib and hmac instead to provide that functionality.

@endersonmenezes
Copy link

endersonmenezes commented Mar 28, 2022

Just for complement, on official documentation says.

Deprecated since version 2.0: Will be removed in Werkzeug 2.1. Use [hmac.compare_digest()](https://docs.python.org/3/library/hmac.html#hmac.compare_digest) instead.

In main branch its correct on line 62 and 63, buts the pypi version is outdated.

@ye
Copy link

ye commented Mar 28, 2022

The current latest version of Flask-Login 0.5.0 has been broken since today because of the Werkzeug upstream version 2.1.0 release.

Can Flask-Login maintainers release a new version and push it to PyPI please?

This is the commit merged into the main branch. (PR #585 )
322e0dd

which was merged in July 2021. A new release is long over due!

Update: it looks like Flask Login version 0.6.0 (PR #598) is in the works but unreleased. Can someone push it to PyPI?

@Xevion
Copy link

Xevion commented Mar 28, 2022

Yup, this just gave me the run around trying to figure out what went wrong with Flask-Login a day after it was working fine.

Werkzeug developers seem to be essentially telling anyone who got hit with this error today should've seen it coming:
pallets/werkzeug#2359 (comment)

@Xevion
Copy link

Xevion commented Mar 29, 2022

Huh. I don't care/have the time enough to actually go through and find how much time the safe_str_cmp was deprecated, but I am a little curious now. How long precisely did flask-login have to notice (and prepare for) what has happened here?

Repository owner deleted a comment from ye Mar 29, 2022
Repository owner locked and limited conversation to collaborators Mar 29, 2022
@davidism
Copy link
Collaborator

We're actively working on updating this project and will make a new release soon. I've locked this as the discussion was not moving in a productive direction.

@davidism
Copy link
Collaborator

Duplicate of #584

@davidism davidism marked this as a duplicate of #584 Mar 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants