Allow other kwargs in ldap.authenticate
stinovlas opened this issue · 3 comments
stinovlas commented
Function django_python3_ldap.ldap.authenticate
checks whether it receives all attributes listed in settings.LDAP_AUTH_USER_LOOKUP_FIELDS
. However, it also checks that there are no other arguments which causes problems when we use multiple django authentication backends. I suggest to replace !=
with not >=
:
- if not password or frozenset(kwargs.keys()) != frozenset(settings.LDAP_AUTH_USER_LOOKUP_FIELDS):
+ if not password or not frozenset(kwargs.keys()) >= frozenset(settings.LDAP_AUTH_USER_LOOKUP_FIELDS):
The proposed change is backwards compatible.
stinovlas commented
If you agree, I can submit a merge request =o).
etianen commented
Agreed! Sounds fine.
…On Wed, 8 Sept 2021 at 08:10, Jan Musílek ***@***.***> wrote:
If you agree, I can submit a merge request =o).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABEKCGGJCZ33ZEOQE2JBSLUA4D5VANCNFSM5DSPGXAA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.