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

Fixes #18800: fix invalid escape in parameter strings #3461

Conversation

gpoblon
Copy link
Contributor

@gpoblon gpoblon commented Jan 6, 2021

@gpoblon gpoblon requested a review from peckpeck January 6, 2021 19:37
@gpoblon
Copy link
Contributor Author

gpoblon commented Jan 11, 2021

a part of this fix comes from an upper-level issue which expecting to be resolved. Therefore this PR should not be reviewed until my next commit

@gpoblon gpoblon removed the request for review from peckpeck January 11, 2021 14:20
@gpoblon
Copy link
Contributor Author

gpoblon commented Jan 13, 2021

PR updated with a new commit

@gpoblon gpoblon requested a review from peckpeck January 18, 2021 10:08
@@ -379,6 +379,21 @@ fn enum_not_expression(i: PInput) -> PResult<PEnumExpressionPart> {
)(i)
}

/// An unescaped string is a literal string delimited by '"""'.
Copy link
Member

Choose a reason for hiding this comment

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

Why move this ? and is it just a move ?

@gpoblon gpoblon force-pushed the bug_18800/fix_invalid_escape_in_parameter_strings branch from 7e23352 to 848d142 Compare January 27, 2021 10:35
@Normation-Quality-Assistant
Copy link
Contributor

This PR is not mergeable to upper versions.
Since it is "Ready for merge" you must merge it by yourself using the following command:
rudder-dev merge https://github.com/Normation/rudder/pull/3461
-- Your faithful QA
Kant merge: "Science is organized knowledge. Wisdom is organized life."
(https://ci.normation.com/jenkins/job/merge-accepted-pr/34912/console)

@gpoblon
Copy link
Contributor Author

gpoblon commented Jan 27, 2021

OK, merging this PR

1 similar comment
@gpoblon
Copy link
Contributor Author

gpoblon commented Jan 27, 2021

OK, merging this PR

@gpoblon gpoblon force-pushed the bug_18800/fix_invalid_escape_in_parameter_strings branch from 848d142 to bdea767 Compare January 27, 2021 16:57
@Normation-Quality-Assistant
Copy link
Contributor

This PR is not mergeable to upper versions.
Since it is "Ready for merge" you must merge it by yourself using the following command:
rudder-dev merge https://github.com/Normation/rudder/pull/3461
-- Your faithful QA
Kant merge: "In law a man is guilty when he violates the rights of others. In ethics he is guilty if he only thinks of doing so."
(https://ci.normation.com/jenkins/job/merge-accepted-pr/34914/console)

@gpoblon
Copy link
Contributor Author

gpoblon commented Jan 27, 2021

OK, merging this PR

@gpoblon gpoblon merged commit bdea767 into Normation:master Jan 27, 2021
@@ -433,14 +433,14 @@ impl Parameter {
self.value
)));
}
Ok((format!("{:#?}", self.value), None))
Ok((format!("\"\"\"{}\"\"\"", self.value), None))
Copy link
Member

Choose a reason for hiding this comment

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

Here all parameters in rl files are unescaped strings, is that what we want ?? Don't we want to keep an unescaped (triple double quotes) string if we got one and and escaped (single double quote string if we got one (

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants