[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [PATCH] Remove locals containing "passphrase" or "password" from exns (#503442).
- From: David Lehman <dlehman redhat com>
- To: Discussion of Development and Customization of the Red Hat Linux Installer <anaconda-devel-list redhat com>
- Subject: Re: [PATCH] Remove locals containing "passphrase" or "password" from exns (#503442).
- Date: Mon, 01 Jun 2009 15:35:32 -0500
On Mon, 2009-06-01 at 13:24 -0400, Chris Lumens wrote:
> ---
> exception.py | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
Looks good to me.
>
> diff --git a/exception.py b/exception.py
> index 7b09646..cc03dba 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
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]