lists.arthurdejong.org
RSS feed

nss-pam-ldapd branch master updated. 0.9.0-40-g7108b1f

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd branch master updated. 0.9.0-40-g7108b1f



This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "nss-pam-ldapd".

The branch, master has been updated
       via  7108b1f41474db7c01c402be798d504c43502cfe (commit)
      from  cda6dcdc9722eb551f8698b8711ad2eae2d02ac6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://arthurdejong.org/git/nss-pam-ldapd/commit/?id=7108b1f41474db7c01c402be798d504c43502cfe

commit 7108b1f41474db7c01c402be798d504c43502cfe
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Sun Aug 18 15:27:34 2013 +0200

    Do not log passwords in pynslcd

diff --git a/pynslcd/common.py b/pynslcd/common.py
index 3a59cbe..146ed4c 100644
--- a/pynslcd/common.py
+++ b/pynslcd/common.py
@@ -111,9 +111,16 @@ class Request(object):
         # write the final result code
         self.fp.write_int32(constants.NSLCD_RESULT_END)
 
+    def log(self, parameters):
+        parameters = dict(parameters)
+        for param in ('password', 'oldpassword', 'newpassword'):
+            if parameters.get(param):
+                parameters['param'] = '***'
+        logging.debug('%s(%r)', self.__class__.__name__, parameters)
+
     def __call__(self):
         parameters = self.read_parameters(self.fp) or {}
-        logging.debug('%s(%r)', self.__class__.__name__, parameters)
+        self.log(parameters)
         self.fp.write_int32(constants.NSLCD_VERSION)
         self.fp.write_int32(self.action)
         self.handle_request(parameters)

-----------------------------------------------------------------------

Summary of changes:
 pynslcd/common.py |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
nss-pam-ldapd
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/