summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-06-01 13:23:42 -0400
committerChris Lumens <clumens@redhat.com>2009-06-01 13:23:42 -0400
commit2aa6d8f67c6bb9a08948e6d520011900e8d1de61 (patch)
tree020185edf9689dd381fde4ca757991bee643be5b
parent8e8f2d08a5239fed86f87f49989813f16ba18a3c (diff)
downloadanaconda-2aa6d8f67c6bb9a08948e6d520011900e8d1de61.tar.gz
anaconda-2aa6d8f67c6bb9a08948e6d520011900e8d1de61.tar.xz
anaconda-2aa6d8f67c6bb9a08948e6d520011900e8d1de61.zip
Remove locals containing "passphrase" or "password" from exns (#503442).
-rw-r--r--exception.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/exception.py b/exception.py
index 7b0964689..cc03dba2b 100644
--- a/exception.py
+++ b/exception.py
@@ -190,6 +190,9 @@ class AnacondaExceptionDump:
]
idSkipList = []
+ # Skip any local variables that contain these words
+ localSkipList = [ "passphrase", "password" ]
+
# Catch attributes that do not exist at the time we do the exception dump
# and ignore them.
for k in skipList:
@@ -207,6 +210,10 @@ class AnacondaExceptionDump:
fd.write ("\nLocal variables in innermost frame:\n")
try:
for (key, value) in frame.f_locals.items():
+ loweredKey = key.lower()
+ if len(filter(lambda s: loweredKey.find(s) != -1, localSkipList)) > 0:
+ continue
+
fd.write ("%s: %s\n" % (key, value))
except:
pass