Skip to content

Commit 4ce398c

Browse files
committed
Only displaying the first two chars of the password in the log, to allow some debuggability.
1 parent 893d087 commit 4ce398c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def _get_products(self):
6666
"no_count=1&" +
6767
"no_cache=1")
6868
if self.auth is not None:
69-
self.logging.info(f"Looking for products using '{url}' with [{self.auth.username}/{self.auth.password}]")
69+
self.logging.info(f"Looking for products using '{url}' with [{self.auth.username}/{self.auth.password[:2]}...]")
7070
else:
7171
self.logging.info(f"Looking for products using '{url}'")
7272
headers = {"Accept": "application/json"}
@@ -121,7 +121,7 @@ def _update_product(self, prod, decoration):
121121
raise Exception(response.text)
122122
except json.JSONDecodeError:
123123
if response.text.find("Incorrect user name or password") != -1:
124-
raise Exception(f"Incorrect user name or password ({self.productopener_username}/{self.productopener_password})")
124+
raise Exception(f"Incorrect user name or password ({self.productopener_username}/{self.productopener_password[:2]}...)")
125125
else:
126126
raise Exception("Response not valid JSON!")
127127
else:

0 commit comments

Comments
 (0)