[Tails-dev] Please review whisperback:a4dfd008

Borrar esta mensaxe

Responder a esta mensaxe
Autor: Alan
Data:  
Para: tails-dev
Asunto: [Tails-dev] Please review whisperback:a4dfd008
Please review the following commit in whisperback master (yes, I know
it's bad to work on master...)

commit a4dfd008a9b11c9f6d41d4e25de891c21af6d235
Author: Tails developers <amnesia@???>
Date: Tue Oct 29 14:15:05 2013 +0000

    More generic IP and MAC sanitizing regexp


    This fixes #6391


diff --git a/whisperBack/utils.py b/whisperBack/utils.py
index 1a62a45..2adc504 100644
--- a/whisperBack/utils.py
+++ b/whisperBack/utils.py
@@ -159,11 +159,11 @@ def sanitize_hardware_info(log_string):
                         log_string)


     # IPs
-    log_string = re.sub(r'\<([\d]{1,3}\.){3}[\d]{1,3}\>',
+    log_string = re.sub(r'([\d]{1,3}\.){3}[\d]{1,3}',
                         r'[IP REMOVED]',
                         log_string)
     # MAC addresses
-    log_string = re.sub(r'\<([0-9a-fA-F]{2}:){5,}[0-9a-fA-F]{2}\>',
+    log_string = re.sub(r'([0-9a-fA-F]{2}:){5,}[0-9a-fA-F]{2}',
                         r'[MAC REMOVED]',
                         log_string)
     return log_string