Ticket #13157 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Double quotes in guestprocess arguments are removed or replaced with a backslash

Reported by: hakito Owned by:
Priority: major Component: guest control
Version: VirtualBox 4.3.12 Keywords:
Cc: Guest type: all
Host type: Windows


When executing a command on the guest via vboxmanage guestcontrol exec or the virtualbox api using double quotes within an argument, it get's replaced with a single backslash character in the guest command line.

For example:

vboxmanage guestcontrol Windows7 exec --username user --password pass --image c:\test.bat -- my""quote
vboxmanage guestcontrol Windows7 exec --username user --password pass --image c:\test.bat -- "my""quote"

Expected command lines:

cmd.exe /c c:\test.bat my""quote
cmd.exe /c c:\test.bat "my""quote"

Actual command lines:

cmd.exe /c c:\test.bat myquote
cmd.exe /c c:\test.bat my\quote

Change History

comment:1 Changed 3 years ago by Magnus Madsen

I can verify this error occurs. I've been trying to find the cause in source, and I believe the problem lies with the RTGetOptArgvToString function found in VBox/Runtime/common/misc/getoptargv.cpp. It is used to convert an array of arguments to an argument string.

I'm not certain though, the function doesn't look like it does anything wrong. I think I'll need to set up an environment so I can compile it in order to narrow down where the error occurs.

comment:2 Changed 3 years ago by frank

Should be now fixed in the latest 4.3.x test builds (>= revision 99851). Could you give it a try?

comment:3 Changed 3 years ago by Jacob Klein


I reported on the dev list that Extension installation/updating/removal is now currently broken in the test builds. See:

Is it probable that the solution for this ticket, was the cause of breaking it? The error makes it seem probable, to me. I'm also having the same problem with build 10026.

The installer failed with exit code 1: VBoxExtPackHelperApp.exe: error: argv[0] does not match the executable image path: 'C:Program FilesOracleVirtualBox/VBoxExtPackHelperApp.exe' != 'C:\Program Files\Oracle\VirtualBox\VBoxExtPackHelperApp.exe'.

Can you look into it and reply?

Thanks, Jacob

Last edited 3 years ago by Jacob Klein (previous) (diff)

comment:4 Changed 3 years ago by Jacob Klein

Regarding my problem, Frank replied with:

thanks for the 'heads-up'. Indeed there was a regression in this build. I've just updated the test builds (100087) which include the fix.

Last edited 3 years ago by Jacob Klein (previous) (diff)

comment:5 Changed 3 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fix is part o VBox 4.3.28.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use