Skip to content

Commit

Permalink
Merge pull request privacyidea#4113 from privacyidea/ldapidresolver_f…
Browse files Browse the repository at this point in the history
…ormatting

formatting
  • Loading branch information
jelinaunger authored Oct 24, 2024
2 parents 3712c76 + 89c2688 commit 15a9422
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions privacyidea/lib/resolvers/LDAPIdResolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def ignore_sizelimit_exception(conn, generator):
last_entry = next(generator)
yield last_entry
except StopIteration:
# If the generator is exceed, we stop
# If the generator is exceeded, we stop
break
except LDAPOperationResult as e:
# If the size limit has been reached, we stop. All other exceptions are re-raised.
Expand Down Expand Up @@ -344,12 +344,10 @@ def checkPass(self, uid, password):
if not have_gssapi:
log.warning('gssapi module not available. Kerberos authentication not possible')
return False
# we need to check credentials with kerberos differently since we
# We need to check credentials with kerberos differently since we
# can not use bind for every user
upn = self.getUserInfo(uid).get('upn')
if upn is not None \
and upn != "None" \
and upn != "":
if upn is not None and upn != "None" and upn != "":
name = gssapi.Name(upn.upper())
else:
name = gssapi.Name(self.getUserInfo(uid).get('username'))
Expand Down

0 comments on commit 15a9422

Please sign in to comment.