mirror of
https://github.com/etesync/server
synced 2024-12-27 09:48:24 +00:00
fix: Python files
This commit is contained in:
parent
55d3fb7e8e
commit
4293acb3a3
@ -136,7 +136,7 @@ async def redis_connector(websocket: WebSocket, ticket_model: TicketInner, user:
|
|||||||
for task in pending:
|
for task in pending:
|
||||||
task.cancel()
|
task.cancel()
|
||||||
if receive in done:
|
if receive in done:
|
||||||
# Web socket should never receieve any data
|
# Web socket should never receive any data
|
||||||
await websocket.close(code=status.WS_1008_POLICY_VIOLATION)
|
await websocket.close(code=status.WS_1008_POLICY_VIOLATION)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ class LDAPConnection:
|
|||||||
try:
|
try:
|
||||||
self.__ldap_connection.simple_bind_s(ldap_setting("BIND_DN", ""), password)
|
self.__ldap_connection.simple_bind_s(ldap_setting("BIND_DN", ""), password)
|
||||||
except ldap.LDAPError as err:
|
except ldap.LDAPError as err:
|
||||||
logging.error(f"LDAP Error occuring during bind: {err.desc}")
|
logging.error(f"LDAP Error occurring during bind: {err.desc}")
|
||||||
|
|
||||||
def __is_cache_valid(self, username):
|
def __is_cache_valid(self, username):
|
||||||
"""Returns True if the cache entry is still valid. Returns False otherwise."""
|
"""Returns True if the cache entry is still valid. Returns False otherwise."""
|
||||||
@ -85,7 +85,7 @@ class LDAPConnection:
|
|||||||
# we may expect ldap.NO_RESULTS_RETURNED, but not any other error
|
# we may expect ldap.NO_RESULTS_RETURNED, but not any other error
|
||||||
return False
|
return False
|
||||||
except ldap.LDAPError as err:
|
except ldap.LDAPError as err:
|
||||||
logging.error(f"Error occured while performing an LDAP query: {err.desc}")
|
logging.error(f"Error occurred while performing an LDAP query: {err.desc}")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if len(result) == 1:
|
if len(result) == 1:
|
||||||
|
Loading…
Reference in New Issue
Block a user