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

Escape quotes in scp arguments to ssh #330

Closed
wants to merge 1 commit into from

Conversation

cbookg
Copy link

@cbookg cbookg commented Jul 12, 2018

@manojampalam
Copy link

Thanks for the fix. I'll have it keep it on hold for now, while we figure out an accurate way to implement execv() equivalent on Windows.

@cbookg
Copy link
Author

cbookg commented Jul 20, 2018

Is there a concern with the current patch? I believe what is missing from a complete solution would be support for backslash escaping as well.

@cbookg
Copy link
Author

cbookg commented Jul 27, 2018

Sorry to pester you @manojampalam , but can I help with what you're looking for in terms of the execv implementation? I'm willing to put in more work on this so as not to have to maintain my own fork/release in my project.

@manojampalam
Copy link

manojampalam commented Jul 27, 2018

Sorry for the delay @cbookg. There isn't a specific concern here. We are working on refactoring session process launching in session.c. It is currently using CreateProcess directly, but the goal is to move it towards posix_spawn model. The problem is that shells in Windows behave different wrt parsing commandline parameters.
cmd.exe with /c argument consumes the rest of the commandline literally, while powershell.exe and other shells rely on argv (that Windows CRT spits using its parsing rules).

The goal here is to accomodate all these variations in a way that still keeps the core code clean and understandable from a non-Windows contributer point of view, since we eventually want the uber community to welcome and to support our changes in OpenSSH's main repository.

@bingbing8
Copy link

@cbookg, thanks for your contribution and patient. we added support of escaping in posix_spawn. quotes in scp arguments should be escaped now. Can we close this PR?

@cbookg
Copy link
Author

cbookg commented Nov 6, 2018

great! closing.

@cbookg cbookg closed this Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants