Keep non-secret Photos account names out of redaction patterns
This commit is contained in:
@@ -148,7 +148,7 @@ class SynologyPhotos:
|
|||||||
|
|
||||||
def connect(self, payload):
|
def connect(self, payload):
|
||||||
password = payload.password.get_secret_value()
|
password = payload.password.get_secret_value()
|
||||||
self.settings.additional_secrets.extend([payload.username, password])
|
self.settings.additional_secrets.append(password)
|
||||||
with self.lock:
|
with self.lock:
|
||||||
sid = self.request(
|
sid = self.request(
|
||||||
"SYNO.API.Auth",
|
"SYNO.API.Auth",
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ def test_connection_stores_session_only(settings, monkeypatch):
|
|||||||
assert stat.S_IMODE(p.path.stat().st_mode) == 0o600
|
assert stat.S_IMODE(p.path.stat().st_mode) == 0o600
|
||||||
assert "test-password" not in p.path.read_text()
|
assert "test-password" not in p.path.read_text()
|
||||||
assert p.sid() == "test-session"
|
assert p.sid() == "test-session"
|
||||||
|
assert settings.sanitize({"name": "pigway-frame-flow"})["name"] == "pigway-frame-flow"
|
||||||
assert (
|
assert (
|
||||||
settings.sanitize({"message": "test-password test-session"})["message"]
|
settings.sanitize({"message": "test-password test-session"})["message"]
|
||||||
== "[REDACTED] [REDACTED]"
|
== "[REDACTED] [REDACTED]"
|
||||||
|
|||||||
Reference in New Issue
Block a user