Skip to content

Commit

Permalink
Python: Assert that there is no space in command arguments
Browse files Browse the repository at this point in the history
This would result in malformed commands being generated.
  • Loading branch information
DemiMarie committed Jan 22, 2025
1 parent 950d383 commit a450614
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions qrexec/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ async def call_async(dest, rpcname, arg=None, *, input=None):

def make_command(dest, rpcname, arg):
assert "+" not in rpcname
assert " " not in rpcname
if arg is not None:
assert " " not in arg
rpcname = f"{rpcname}+{arg}"

if VERSION == "dom0" and dest == "dom0":
Expand Down

0 comments on commit a450614

Please sign in to comment.