@troubadour I experimented in my above commits with pickle vs text files. Feel free to wipe any non-ideal changes by me when your json based version comes. Please forward port any useful enhancements by me (like improving show_message arg parser) in sdwdate-gui to your json based version.
(If you are going for json. Whatever works best.)
sdwdate-gui should now be more secure without pickle. While doing so I introduced two new bugs in the output.
bTor Bootstrap Result: Tor's Control Port could not be reached.
Did you start Gateway beforehand?\n
the b at the beginning
and the \n at the end
Do I have a type error somewhere? Can we prevent this through a type conversion?
Would be cool if you could help with this so it gets fixed for Whonix 14. Otherwise no rush, it would be a minor regression, not a blocker.
More importantly…
Now after the above two git commits… The following code should be safe from code execution even if the file content was malicious?
with open(self.msg_path, 'rb') as f:
msg = f.read()
...
self.setIcon(QtGui.QIcon(status))
self.message = msg
self.setToolTip('%s\n%s' %(self.title, self.message))
The following code should be safe from code execution even if the file content was malicious?
Not sure passing binary data is safer than plain strings. (BTW the `b’ at the beginning of each message stems from that).
Why not
with open(self.msg_path, 'r') as f:
msg = f.read()
and in sdwdate
with open(sdwdate.status_path, 'w') as f:
f.write(icon)
and pass the icon and messages without encoding?
But in any case I will have to use json to get status and message in the same file for the connection between the gateway and the workstations. It should be relatively straight forward as the data structure is the same.
A internet search security json vs pickle tells that json is a lot more secure. I could have checked before replying in the first place.
Before pushing, I would like to move the icons from swdate to sdwdate-gui in both versions, so that after this last change, sdwdate-gui non-qubes should be final for Whonix 14.
I know you made the move already, but it’s difficult to merge because of the other changes (remove pickle) and the encoding.
Ported you changes in show-message, with a bug fix (the hard way).
Startup requires more than a second. When clicking it, nothing happens which seems strange. This leads to double clicking when will then result in only sometimes starting it.
Search engines indicate that QProcess() is slow. Do you think there is a solution for this?
The delay is showing after changing the ownership of the script to sdwdate-gui (It shows also in or sdwdate-gui-qubes). We cannot open sdwdate’s log either. The konsole pops with a warning chdir: Permission denied