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

mda command is missing one level of escaping, and thus cannot be used with quotes #921

Open
Ekleog opened this issue Jun 21, 2019 · 3 comments
Assignees
Labels

Comments

@Ekleog
Copy link
Contributor

Ekleog commented Jun 21, 2019

Using something like action do_mda mda "/bin/foo \"bar\"", the equivalent of which worked in 6.3.0, no longer works in 6.4.0 by failing with mail.mda: mail.mda: only one command is supported, due to a missing escape in https://github.com/OpenSMTPD/OpenSMTPD/blob/portable/smtpd/parse.y#L681 I would guess.

@poolpOrg
Copy link
Member

I will have a look at it this week, the issue is not where you think, it is caused by a fundamental change where we used to rely on an execve() system call to run the mda whereas we now pass the mda line to a shell so it gets a chance at parsing the mda line better than we did (ie: support globbing, etc...).

In the meantime, replace your "bar" with 'bar' (single quote, no escape) and it will solve your issue.

@poolpOrg poolpOrg self-assigned this Jun 23, 2019
@ngortheone
Copy link
Contributor

I will have a look at it this week

@poolpOrg what is the status of this?

@poolpOrg
Copy link
Member

poolpOrg commented Nov 3, 2019

tricky issue with easy workarounds so not very high priority, will be dealt with when the more pressing issues are solved

@ngortheone ngortheone added the P-Low Low priority label Nov 3, 2019
DemiMarie added a commit to DemiMarie/OpenSMTPD that referenced this issue Oct 12, 2020
This avoids having to use a shell for them.

Fixes OpenSMTPD#921
DemiMarie added a commit to DemiMarie/OpenSMTPD that referenced this issue Oct 12, 2020
This avoids having to use a shell for them.

Fixes OpenSMTPD#921
DemiMarie added a commit to DemiMarie/OpenSMTPD that referenced this issue Oct 12, 2020
This avoids having to use a shell for them.

Fixes OpenSMTPD#921
DemiMarie added a commit to DemiMarie/OpenSMTPD that referenced this issue Oct 14, 2020
This avoids having to use a shell for them.

Fixes OpenSMTPD#921
DemiMarie added a commit to DemiMarie/OpenSMTPD that referenced this issue Oct 14, 2020
This avoids having to use a shell for them.

Fixes OpenSMTPD#921
DemiMarie added a commit to DemiMarie/OpenSMTPD that referenced this issue Oct 15, 2020
This avoids having to use a shell for them.

Fixes OpenSMTPD#921
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants