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

WRONGPASS response doesn't raise AuthenticationError exception #2329

Merged
merged 1 commit into from
Aug 29, 2022

Conversation

lucacillario
Copy link
Contributor

@lucacillario lucacillario commented Aug 9, 2022

Pull Request check-list

Please make sure to review and check all of these items:

  • Does $ tox pass with this change (including linting)?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?
  • Was the change added to CHANGES file?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

Newer versions of Redis (>= 6.0) have introduced new authentication errors, which are currently not handled in redis-py:

  • "-ERR AUTH called without any password configured for the default user. Are you sure your configuration is correct?", instead of "-ERR Client sent AUTH, but no password is set"
  • "-WRONGPASS invalid username-password pair or user is disabled." instead of "-ERR invalid password"

In these cases a ResponseError was raised, instead of an AuthenticationError.

Closes #2325

@lucacillario lucacillario marked this pull request as ready for review August 10, 2022 09:34
@lucacillario lucacillario marked this pull request as draft August 10, 2022 12:10
@lucacillario lucacillario marked this pull request as ready for review August 10, 2022 17:33
@dvora-h dvora-h merged commit bd0e8f2 into redis:master Aug 29, 2022
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

Successfully merging this pull request may close these issues.

WRONGPASS response doesn't raise AuthenticationError exception
2 participants