Bug #16563

Configuring additional APT repositories make WhisperBack crash

Added by sajolida 2019-03-15 19:30:33 . Updated 2019-03-20 14:25:07 .

Status:
Resolved
Priority:
Elevated
Assignee:
Category:
Target version:
Start date:
2019-03-15
Due date:
% Done:

100%

Feature Branch:
https://github.com/saschamarkus/whisperback/pull/new/bugfix/16563-Configuring-additional-APT-repositories-made-WhisperBack-crash
Type of work:
Code
Blueprint:

Starter:
Affected tool:
WhisperBack
Deliverable for:

Description

I tried on 2 Tails systems (mine and a fresh one) to follow the instructions we have in https://tails.boum.org/doc/first_steps/additional_software/index.en.html#index5h1. They work in terms of APT but then I can’t start WhisperBack. I’m getting:

amnesia@amnesia:~$ whisperback 
Traceback (most recent call last):
  File "/usr/bin/whisperback", line 34, in <module>
    ui = whisperBack.WhisperBackUI()
  File "/usr/lib/python3/dist-packages/whisperBack/gui.py", line 127, in __init__
    self.backend = whisperBack.whisperback.WhisperBack()
  File "/usr/lib/python3/dist-packages/whisperBack/whisperback.py", line 120, in __init__
    self.appended_data = self.__get_debug_info(self.mail_appended_info())
  File "/usr/lib/python3/dist-packages/whisperBack/whisperback.py", line 163, in __get_debug_info
    sanitized = '{}\n'.format(whisperBack.utils.sanitize_hardware_info(line))
  File "/usr/lib/python3/dist-packages/whisperBack/utils.py", line 196, in sanitize_hardware_info
    log_string)
  File "/usr/lib/python3.5/re.py", line 182, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object

Marking as Elevated since it’s a regression that prevents people from reporting bugs, though I don’t think that it’s a popular feature.


Subtasks


Related issues

Blocks Tails - Bug #15626: Verify (and Document?) Additional Software Feature behaviour with apt-key Confirmed 2018-05-29
Blocks Tails - Feature #15507: Core work 2019Q1: Foundations Team Resolved 2018-04-08

History

#1 Updated by sajolida 2019-03-15 19:32:43

  • blocks Bug #15626: Verify (and Document?) Additional Software Feature behaviour with apt-key added

#2 Updated by intrigeri 2019-03-16 15:35:13

  • Status changed from New to Confirmed
  • Assignee set to sascha.markus@gmail.com

Hi sascha.markusgmail.com, can you please take a look? It seems that this might be a consequence of the debugging info changes we did a little while ago. I think you’re the person who’s the most familiar with this part of our code base at the moment :)

#3 Updated by sascha.markus@gmail.com 2019-03-17 19:32:27

  • Status changed from Confirmed to Fix committed
  • Assignee changed from sascha.markus@gmail.com to intrigeri
  • Feature Branch set to https://github.com/saschamarkus/whisperback/pull/new/bugfix/16563-Configuring-additional-APT-repositories-made-WhisperBack-crash

Hi @intrigeri
you’re right. This bug was introduced with the changes to have dicts for the debug info.
I could reproduce and fix the issue.
A fix is available here:
https://github.com/saschamarkus/whisperback/pull/new/bugfix/16563-Configuring-additional-APT-repositories-made-WhisperBack-crash

#4 Updated by intrigeri 2019-03-18 07:15:55

  • Status changed from Fix committed to In Progress
  • Target version set to Tails_3.13
  • QA Check set to Ready for QA

sascha.markusgmail.com, thanks a lot for the super quick turnaround. I’ll see if I can sneak this into 3.13.

FYI, in this context “Fix committed” means “committed to the branch for the next Tails release”, which isn’t the case here. See https://tails.boum.org/contribute/merge_policy/#submit for the code submission process and https://tails.boum.org/contribute/working_together/Redmine/ for info about the semantics of Redmine metadata here.

#5 Updated by intrigeri 2019-03-18 08:27:36

  • % Done changed from 0 to 50
  • QA Check changed from Ready for QA to Pass

Code review passes. Tested, works for me ⇒ merged. Will now release a new WhisperBack and upload.

#6 Updated by intrigeri 2019-03-18 08:40:15

  • Status changed from In Progress to Fix committed
  • Assignee deleted (intrigeri)
  • % Done changed from 50 to 100

Released in WhisperBack 1.7.21.

#7 Updated by intrigeri 2019-03-18 08:40:42

#8 Updated by CyrilBrulebois 2019-03-20 14:25:07

  • Status changed from Fix committed to Resolved