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 more characters for shell stuff #2302

Merged
merged 1 commit into from Jun 6, 2020
Merged

Conversation

ferd
Copy link
Collaborator

@ferd ferd commented Jun 6, 2020

As reported by Alexey Pronin, this would let people potentially pass in
URLs that can call to command execution.

While running arbitrary code is kind of our bread and butter, it makes
sense to at least play nicely and escape more characters:

  • the pipe (|) which can be used to run subcommands
  • the tab (\t) which the shell interprets as a space.
  • the home directory (~) just because the expansion could behave funny
  • redirection (< and >) to avoid problems with data setting up
    streams

As reported by Alexey Pronin, this would let people potentially pass in
URLs that can call to command execution.

While running arbitrary code is kind of our bread and butter, it makes
sense to at least play nicely and escape more characters:

- the pipe (`|`) which can be used to run subcommands
- the tab (`\t`) which the shell interprets as a space.
- the home directory (`~`) just because the expansion could behave funny
- redirection (`<` and `>`) to avoid problems with data setting up
  streams
@ferd ferd requested a review from tsloughter Jun 6, 2020
@ferd ferd merged commit d18e1be into erlang:master Jun 6, 2020
@ferd ferd deleted the escape-more-chars branch Jun 6, 2020
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.

None yet

2 participants