Skip to content

Replace UnixShellQuote with shsprintf.EscapeDefaultContext from github.com/google/safetext#40046

Merged
jentfoo merged 1 commit intomasterfrom
jent/UnixShellQuote-replacement
Mar 29, 2024
Merged

Replace UnixShellQuote with shsprintf.EscapeDefaultContext from github.com/google/safetext#40046
jentfoo merged 1 commit intomasterfrom
jent/UnixShellQuote-replacement

Conversation

@jentfoo
Copy link
Copy Markdown
Contributor

@jentfoo jentfoo commented Mar 29, 2024

This PR is a follow up to #39644 where UnixShellQuote was introduced.

This is a change in how we are handling the untrusted input. Instead of adopting a strategy of quoting (which was discovered to be incomplete), this instead escapes any special characters.

Although github.com/google/safetext is new, and without any current tags for us to reference, I believe it would be better to reference their implementation than to update the UnixShellQuote to handle the newly identified cases.

@github-actions
Copy link
Copy Markdown
Contributor

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

@jentfoo jentfoo added the no-changelog Indicates that a PR does not require a changelog entry label Mar 29, 2024
…hub.com/google/safetext

This change is a change in how we are handling the untrusted input.  Instead of adopting a strategy of quoting (which was incomplete), this instead escapes any special characters.

Although github.com/google/safetext is new, and without any current tags for us to reference, I believe it would be better to reference their implementation than to update the UnixShellQuote to handle the newly identified cases.
@jentfoo jentfoo force-pushed the jent/UnixShellQuote-replacement branch from 7f07d27 to 4f636ac Compare March 29, 2024 19:54
Copy link
Copy Markdown
Collaborator

@zmb3 zmb3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks Jent!

@jentfoo jentfoo added this pull request to the merge queue Mar 29, 2024
Merged via the queue into master with commit d0a722d Mar 29, 2024
@jentfoo jentfoo deleted the jent/UnixShellQuote-replacement branch March 29, 2024 22:06
@public-teleport-github-review-bot
Copy link
Copy Markdown

@jentfoo See the table below for backport results.

Branch Result
branch/v13 Failed
branch/v14 Failed
branch/v15 Failed

jentfoo added a commit that referenced this pull request Mar 29, 2024
…hub.com/google/safetext (#40046)

This change is a change in how we are handling the untrusted input.  Instead of adopting a strategy of quoting (which was incomplete), this instead escapes any special characters.

Although github.com/google/safetext is new, and without any current tags for us to reference, I believe it would be better to reference their implementation than to update the UnixShellQuote to handle the newly identified cases.
jentfoo added a commit that referenced this pull request Mar 29, 2024
…hub.com/google/safetext (#40046)

This change is a change in how we are handling the untrusted input.  Instead of adopting a strategy of quoting (which was incomplete), this instead escapes any special characters.

Although github.com/google/safetext is new, and without any current tags for us to reference, I believe it would be better to reference their implementation than to update the UnixShellQuote to handle the newly identified cases.
jentfoo added a commit that referenced this pull request Mar 29, 2024
…hub.com/google/safetext (#40046)

This change is a change in how we are handling the untrusted input.  Instead of adopting a strategy of quoting (which was incomplete), this instead escapes any special characters.

Although github.com/google/safetext is new, and without any current tags for us to reference, I believe it would be better to reference their implementation than to update the UnixShellQuote to handle the newly identified cases.
github-merge-queue Bot pushed a commit that referenced this pull request Apr 1, 2024
…hub.com/google/safetext (#40046) (#40060)

This change is a change in how we are handling the untrusted input.  Instead of adopting a strategy of quoting (which was incomplete), this instead escapes any special characters.

Although github.com/google/safetext is new, and without any current tags for us to reference, I believe it would be better to reference their implementation than to update the UnixShellQuote to handle the newly identified cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Indicates that a PR does not require a changelog entry size/sm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants