-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Spaces in fact traits are being prefixed with backslashes #2814
Comments
Looks like your first issue -- we aim to respond to issues as quickly as possible. In the meantime, check out our documentation here: http://caldera.readthedocs.io/ |
I came to check if this had been previously reported as i too am experiencing the same unexpected behavior. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
Bump. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
@dan-kir what ability / plugin were you using when you encountered this issue? I was not able to replicate when testing on an arbitrary ability (spaces were retained from fact to command), which makes me think it may be related to the ability or plugin that you are using. |
In the provided screenshots, I am using a custom ability that simply sends a GET request using curl. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
@dan-kir Still having issue? |
@elegantmoose Yes still seeing spaces in facts being escaped when used in abilities. I can provide more examples if it will help. |
I still cannot replicate. I modified the Leave note ability as shown in your screenshots @dan-kir and I did not experience the space escaping behavior. I will add that |
That's it! That function is being called because I'm using a 'sh' executor. I confirmed this was my problem by updating the 'escaped' function like so: def escaped(self, executor):
#if executor not in escape_ref:
return self.value
escaped_value = str(self.value)
#for char in escape_ref[executor]['special']:
# escaped_value = escaped_value.replace(char, (escape_ref[executor]['escape_prefix'] + char))
return escaped_value This works for me in the short-term. Unsure what a long-term fix looks like. Could spaces be removed from the 'escape_ref' dictionary? |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
Describe the bug
Spaces in fact traits are being prefixed with backslashes when used in abilities.
This is causing problems when trying to seed an operation with a fact source that includes such traits.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screenshots
Example fact trait:
Example command being executed:
Desktop (please complete the following information):
Additional context
Don't think the issue is with the agents. Tested both Sandcat and Ragdoll agents.
The text was updated successfully, but these errors were encountered: