mirror of
https://github.com/amidaware/tacticalrmm.git
synced 2026-04-26 15:05:57 +03:00
[GH-ISSUE #918] escaping issue with custom field string replacement #566
Labels
No labels
In Process
bug
bug
dev-triage
documentation
duplicate
enhancement
fixed
good first issue
help wanted
integration
invalid
pull-request
question
requires agent update
security
ui tweak
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tacticalrmm#566
Loading…
Add table
Add a link
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?
Originally created by @bbrendon on GitHub (Jan 5, 2022).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/918
Originally assigned to: @sadnub on GitHub.
Describe the bug
Puting a custom field with a value like

asdf\basdfand passing that custom field to a power shell script as a parameter you get output like:BUT
If you don't use a custom field, and just enter it as a parameter to a power shell script, the
\bdoesn't corrupt.I'm thinking this is fixable? Seems like it should be.
Create a Simple powershell script in tactical:
call it with Args :
-MYARG asdf\basdf...Which should work.
Put
asdf\basdfinto custom fieldcall script with arg: `-MYARG {{agent.FIELD}}
You should get the corrupt output.
@sadnub commented on GitHub (Aug 14, 2022):
Any text in custom fields must be escaped manually. This will break other properties like newlines, tabs, etc if I escape all backslashes. It will also break existing functionality if someone is already escaping output.