Skip to content

Handle escaped '%' in commands data section#200

Merged
ericsciple merged 4 commits intomasterfrom
users/ericsciple/m162escape
Jan 12, 2020
Merged

Handle escaped '%' in commands data section#200
ericsciple merged 4 commits intomasterfrom
users/ericsciple/m162escape

Conversation

@ericsciple
Copy link
Copy Markdown
Collaborator

@ericsciple ericsciple commented Nov 18, 2019

fixes #267

@ericsciple ericsciple changed the title Handle escaped in commands data section Handle escaped '%' in commands data section Nov 18, 2019

private static readonly EscapeMapping[] _escapeDataMappings = new[]
{
new EscapeMapping(token: "%", replacement: "%25"),
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@TingluoHuang any reason not to handle this? This enables literal %0A or %0D

@thboop
Copy link
Copy Markdown
Collaborator

thboop commented Nov 20, 2019

Whats the motivation here? Can we link to an issue?

We should also update the toolkit
https://github.com/actions/toolkit/blob/ef4525e9ddfa812429fd0f8c82dfa8266c89ce9a/packages/core/src/command.ts#L77

@ericsciple ericsciple force-pushed the users/ericsciple/m162escape branch from 5d056a7 to 36d110f Compare January 12, 2020 07:42
@ericsciple ericsciple merged commit a9c58d7 into master Jan 12, 2020
@ericsciple ericsciple deleted the users/ericsciple/m162escape branch January 12, 2020 08:30
AdamOlech pushed a commit to antmicro/runner that referenced this pull request Jan 28, 2021
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.

Commands do not allow literal %0A

3 participants