Ignore non-object settings scrub inputs (#1645)

This commit is contained in:
red person
2026-06-03 08:11:05 +03:00
committed by GitHub
parent b409b20940
commit d1309f3bd6
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -47,4 +47,6 @@ def _scrub_value(key, value):
def scrub_settings(settings: dict) -> dict:
"""Return a copy of ``settings`` with secret-shaped values masked (deep)."""
if not isinstance(settings, dict):
return {}
return {k: _scrub_value(k, v) for k, v in (settings or {}).items()}