__key_value fails if initial value contains metacharacters #321
Labels
No labels
bugfix
cleanup
discussion
documentation
doing
done
feature
improvement
packaging
Stale
testing
TODO
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: ungleich-public/cdist#321
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Created by: phrawzty
The
awk
command which performs the essential function of__key_value
will fail if the initial value contains metacharacters. For example :This will end up generating an awk gsub string that contains the following :
The first element is clearly illegal and will result in a syntax failure from
awk
.A solution is to replace the slashes which surround the first element at line 43 of
/conf/type/__key_value/gencode-remote
with double-quotes, as is already the case with the second element. Is there any particular reason why slashes are preferred here over double-quotes ?Created by: phrawzty
Hehe, yes, that is exactly the solution. :)
Created by: telmich
Should be fixed in
62b5af8
, can you verify that it works for you?