Re: [Tails-dev] Please review whisperback:a4dfd008

このメッセージを削除

このメッセージに返信
著者: bertagaz
日付:  
To: The Tails public development discussion list
題目: Re: [Tails-dev] Please review whisperback:a4dfd008
Hi,

On Sun, Nov 24, 2013 at 12:51:10PM +0000, Alan wrote:
> 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


That sound relevant to me, so I guess we're good to go with this change.

bert.