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

Over-escaping in drush ssh when using compound statement #3894

Closed
weitzman opened this issue Jan 30, 2019 · 1 comment
Closed

Over-escaping in drush ssh when using compound statement #3894

weitzman opened this issue Jan 30, 2019 · 1 comment
Milestone

Comments

@weitzman
Copy link
Member

from @mishac in #drush

$ drush -v @dev ssh "cd .. && pwd"
[info] Executing: ssh -o PasswordAuthentication=no USER@HOST 'cd /var/www/vhosts/HOST/dev/web && cd .. '\''&&'\'' pwd' 

Note odd escaping of &&

We may need to assume already-escaped in this case.

@greg-1-anderson greg-1-anderson added this to the drush9 milestone Jan 30, 2019
@greg-1-anderson
Copy link
Member

I think we need to presume that if there is only one parameter to ssh, then it is pre-escaped.

I'm not sure exactly where is the best place to insert that assumption. I think that if the Drush ssh command did the check and wrapped its only parameter in Shell::preEscaped(), it would work.

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

No branches or pull requests

2 participants