-
Notifications
You must be signed in to change notification settings - Fork 73
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 #11326: chars are not escaped correctly in dsc techniques #1736
Fixes #11326: chars are not escaped correctly in dsc techniques #1736
Conversation
if (x == null) | ||
x | ||
else | ||
x.replaceAll("""\\""", """\\\\""").replaceAll(""""""", """\\"""") | ||
agentType match { | ||
case AgentType.Dsc => x.replaceAll("`", "``").replaceAll("\"", "`\"") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you correct the indentation ? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it " that we escape, rather than simply " ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" is escaped because it's a double quote string, so to contains a " it needs to be escaped
@@ -802,6 +802,7 @@ trait PromiseGeneration_buildNodeConfigurations extends PromiseGenerationService | |||
(name, p) | |||
} | |||
} | |||
agent <- Box(context.nodeInfo.agentsName.headOption) ?~! "Should not be Empty" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Should not be Empty" => "The agent type is not defined. Please, report it, it is most likelly a bug".
Appart for the 2 little remarks, it's ok. You can correct and label for merge on your own. |
PR rebased |
5e2bf1d
to
0bec59e
Compare
Closing, wrong target branch |
replaced by #1737 |
https://www.rudder-project.org/redmine/issues/11326