Skip to content

Commit

Permalink
Ignore case when obfuscating passwords in python configuration scripts (
Browse files Browse the repository at this point in the history
apache#15077)

(cherry picked from commit 8a67a38)
  • Loading branch information
michaeljmarshall committed Apr 8, 2022
1 parent c4dc27e commit a949ef9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docker/pulsar/scripts/apply-config-from-env-with-prefix.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
v = os.environ[k].strip()

# Hide the value in logs if is password.
if "password" in k:
if "password" in k.lower():
displayValue = "********"
else:
displayValue = v
Expand All @@ -80,7 +80,7 @@
continue

# Hide the value in logs if is password.
if "password" in k:
if "password" in k.lower():
displayValue = "********"
else:
displayValue = v
Expand Down
4 changes: 2 additions & 2 deletions docker/pulsar/scripts/apply-config-from-env.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
v = os.environ[k].strip()

# Hide the value in logs if is password.
if "password" in k:
if "password" in k.lower():
displayValue = "********"
else:
displayValue = v
Expand All @@ -82,7 +82,7 @@
continue

# Hide the value in logs if is password.
if "password" in k:
if "password" in k.lower():
displayValue = "********"
else:
displayValue = v
Expand Down

0 comments on commit a949ef9

Please sign in to comment.