diff --git a/syncmail b/syncmail index e299b21c..9a3306a2 100755 --- a/syncmail +++ b/syncmail @@ -185,9 +185,6 @@ def calculate_diff(filespec, contextlines): str(e), '\n***** file: ', file, ' cwd: ', os.getcwd()] elif newrev == 'NONE': lines = ['--- %s DELETED ---\n' % file] - elif string.find(file,"httpd.conf") == 0 or string.find(file,"create_sondage.py") == 0: - # Il y a le mdp mysql pour les sondages dans ces fichiers - lines = ['--- diff de %s masquée ---n' % file] else: # This /has/ to happen in the background, otherwise we'll run into CVS # lock contention. What a crock. @@ -203,6 +200,17 @@ def calculate_diff(filespec, contextlines): # ignore the error code, it always seems to be 1 :( ## if sts: ## return 'Error code %d occurred during diff\n' % (sts >> 8) + + try: + # On vire du diff les lignes marquées avec *PASS* + a=0 + while 1: + a=a+1 + if string.find(lines[a],'*PASS*') > -1: + lines[a]= '[ Mot de passe ]\n' + except: + a=0 + if len(lines) > DIFF_TRUNCATE_IF_LARGER: removedlines = len(lines) - DIFF_HEAD_LINES - DIFF_TAIL_LINES del lines[DIFF_HEAD_LINES:-DIFF_TAIL_LINES]