Skip to content

Commit

Permalink
Fix LDAP_SERVER_PORT not being used
Browse files Browse the repository at this point in the history
makes use of the LDAP_SERVER_PORT variable
  • Loading branch information
primetheus authored Sep 18, 2023
1 parent 8fcb9f1 commit 041ba06
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions githubapp/ldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ class LDAPClient:
def __init__(self):
# Read settings from the config file and store them as constants
self.LDAP_SERVER_HOST = os.environ["LDAP_SERVER_HOST"]
self.LDAP_SERVER_PORT = os.environ["LDAP_SERVER_PORT"]
if "LDAP_SERVER_PORT" in os.environ:
self.LDAP_SERVER_PORT = os.environ["LDAP_SERVER_PORT"]
else
self.LDAP_SERVER_PORT = 389
self.LDAP_BASE_DN = os.environ["LDAP_BASE_DN"]
self.LDAP_USER_BASE_DN = os.environ["LDAP_USER_BASE_DN"]
self.LDAP_USER_ATTRIBUTE = os.environ["LDAP_USER_ATTRIBUTE"]
Expand Down Expand Up @@ -76,7 +79,7 @@ def __init__(self):

self.srv = Server(
host=self.LDAP_SERVER_HOST,
port=self.LDAP_SERVER_HOST,
port=self.LDAP_SERVER_PORT,
use_ssl=self.USE_SSL,
tls=self.tls,
)
Expand Down

0 comments on commit 041ba06

Please sign in to comment.