mirror of
https://github.com/amidaware/tacticalrmm.git
synced 2026-04-26 15:05:57 +03:00
[GH-ISSUE #1609] Script Manager does not expand custom fields in Environmental Variables section #2951
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#2951
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 @NiceGuyIT on GitHub (Aug 22, 2023).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/1609
Server Info (please complete the following information):
Installation Method:
Agent Info (please complete the following information):
Describe the bug
The scripting system does not expand global keys or custom fields for environmental variables. They are expanded for script arguments.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expected the environmental variables to be expanded like the script arguments.
Screenshots

As you can see, the arguments are expanded while the environmental variables are not.
Additional context
This script was used for the screenshot.
@NiceGuyIT commented on GitHub (Sep 18, 2023):
After updating a script to replace global keys in the script itself, I discovered
{{global.KEY_NAME}}in the script is strictly for script snippets, not custom fields or global keys.{{agent.Key_Name}}in a script will be replaced with the script snippet calledagent.Key_Name.This issue is a blocker to securely pass information from global keys and custom fields to scripts.
@wh1te909 commented on GitHub (Sep 30, 2023):
done will be in next release