Skip to content
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

[dev.icinga.com #13469] Command escape is broken for Windows #4849

Closed
icinga-migration opened this issue Dec 8, 2016 · 3 comments · Fixed by #7092
Closed

[dev.icinga.com #13469] Command escape is broken for Windows #4849

icinga-migration opened this issue Dec 8, 2016 · 3 comments · Fixed by #7092
Assignees
Labels
area/windows Windows agent and plugins bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/13469

Created by jflach on 2016-12-08 10:11:02 +00:00

Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-12-08 10:11:02 +00:00 (in Redmine)

Icinga Version: 2.6.0
Backport?: Not yet backported
Include in Changelog: 1

Windows has special needs when it comes to escaping:

For a Programm to receive "foo bar" (with ") the correct shell escaped string would be "foo bar^", yet icinga creates the string "\"foo bar\"".

@icinga-migration icinga-migration added bug Something isn't working libbase labels Jan 17, 2017
@gunnarbeutner gunnarbeutner added area/windows Windows agent and plugins and removed libbase labels Feb 7, 2017
@Al2Klimov
Copy link
Member

Note:

I asked @LordHepipud to evaluate what's the right escaping algo.

My guess: Put a ^ before every character.

@Al2Klimov
Copy link
Member

Note:

CreateProcess() seems not to parse the command line string, but to call the exe with that string and let it parse it by itself.

See http://www.daviddeley.com/autohotkey/parameters/parameters.htm

@Al2Klimov
Copy link
Member

Al2Klimov added a commit that referenced this issue Apr 8, 2019
@Al2Klimov Al2Klimov self-assigned this Apr 8, 2019
julianbrost pushed a commit that referenced this issue Jan 28, 2021
@icinga-probot icinga-probot bot added this to the 2.13.0 milestone Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/windows Windows agent and plugins bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants