Procházet zdrojové kódy

fix: improve debug logging for bind_password decryption in load_config function

Manuel před 7 měsíci
rodič
revize
b8e812e7ec
1 změnil soubory, kde provedl 6 přidání a 2 odebrání
  1. 6 2
      services/ldap/ldap_config_service.py

+ 6 - 2
services/ldap/ldap_config_service.py

@@ -70,10 +70,14 @@ def load_config() -> dict:
             try:
             try:
                 bind_password = _decrypt_password(bind_password, row.encryption_key)
                 bind_password = _decrypt_password(bind_password, row.encryption_key)
             except InvalidToken:
             except InvalidToken:
-                print("[LDAP DEBUG] load_config: stored bind_password could not be decrypted with row encryption key, hiding password")
+                print(
+                    "[LDAP DEBUG] load_config: stored bind_password could not be decrypted with row encryption key, hiding password"
+                )
                 bind_password = ""
                 bind_password = ""
         elif bind_password and not row.encryption_key:
         elif bind_password and not row.encryption_key:
-            print("[LDAP DEBUG] load_config: bind_password present without encryption key, keeping raw value")
+            print(
+                "[LDAP DEBUG] load_config: bind_password present without encryption key, keeping raw value"
+            )
 
 
         cfg = {
         cfg = {
             "host": row.host or "",
             "host": row.host or "",