-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bugs in the icon-receiver #153
base: main
Are you sure you want to change the base?
Conversation
The trailing \x00 in the request header make the domain name as follow (domain\x00). Which cause a bug when listing domains using qubesadminapi. This bug occured when the icon-receiver is running on guivm other than dom0.
window-icon-updater/icon-receiver
Outdated
@@ -342,7 +342,7 @@ class IconReceiver(object): | |||
try: | |||
# Parse header from qrexec | |||
header = await reader.readuntil(b'\0') | |||
header_parts = header.decode('ascii').split(' ') | |||
header_parts = header.decode('ascii').split(' ').restrip('\x00') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List doesn't have restrip()
method. Did you mean .rstrip()
just before .split()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a mistake.
Yep, the rstrip should be added before split.
Or at header_parts[1].rstrip('\x00')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better before split, as this is terminator of this whole header, not a specific part
@@ -342,7 +342,7 @@ class IconReceiver(object): | |||
try: | |||
# Parse header from qrexec | |||
header = await reader.readuntil(b'\0') | |||
header_parts = header.decode('ascii').split(' ') | |||
header_parts = header.decode('ascii').restrip('\x00').split(' ') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
header_parts = header.decode('ascii').restrip('\x00').split(' ') | |
header_parts = header.decode('ascii').rstrip('\x00').split(' ') |
guivm-gui-agent
toguivm
icon-reciever
running on guivm other than dom0 the header received is as follow:Request coming from appvm to dom0
\x00
cause a bug when trying to get the color of the vm usingqubesadminapi
.