Skip to content

Escape more characters for shell stuff#2302

Merged
ferd merged 1 commit into
erlang:masterfrom
ferd:escape-more-chars
Jun 6, 2020
Merged

Escape more characters for shell stuff#2302
ferd merged 1 commit into
erlang:masterfrom
ferd:escape-more-chars

Conversation

@ferd

@ferd ferd commented Jun 6, 2020

Copy link
Copy Markdown
Collaborator

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 June 6, 2020 18:17
@ferd ferd merged commit d18e1be into erlang:master Jun 6, 2020
@ferd ferd deleted the escape-more-chars branch June 6, 2020 20:50
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.

2 participants