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 #11326: chars are not escaped correctly in dsc techniques #1736

Conversation

VinceMacBuche
Copy link
Member

if (x == null)
x
else
x.replaceAll("""\\""", """\\\\""").replaceAll(""""""", """\\"""")
agentType match {
case AgentType.Dsc => x.replaceAll("`", "``").replaceAll("\"", "`\"")
Copy link
Member

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 ? :)

Copy link
Member

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 " ?

Copy link
Member Author

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"
Copy link
Member

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".

@fanf
Copy link
Member

fanf commented Sep 15, 2017

Appart for the 2 little remarks, it's ok. You can correct and label for merge on your own.

@VinceMacBuche
Copy link
Member Author

PR rebased

@VinceMacBuche VinceMacBuche force-pushed the bug_11326/chars_are_not_escaped_correctly_in_dsc_techniques branch from 5e2bf1d to 0bec59e Compare September 17, 2017 21:44
@VinceMacBuche
Copy link
Member Author

Closing, wrong target branch

@VinceMacBuche
Copy link
Member Author

replaced by #1737

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants