i want to be able to upload and run a script on-the-fly, then remove it, everything on top of API
✅ 1
r
Ryan Valizan
10/21/2023, 5:28 PM
You could write a restAPI to receive said script request, but this is highly unadvised as you’re basically opening yourself to injection attacks.
It’s one thing to send variables and use those on the NS end to execute code and possibly return a response, but to accept any script and execute it is not a good plan.
b
Bit
10/21/2023, 5:29 PM
exactly, i do not want to create a backdoor in my env
r
Ryan Valizan
10/21/2023, 5:30 PM
Why can’t you send variables to a script then? Why does the entire script need changed each time?
b
Bit
10/21/2023, 5:31 PM
you are right. i just had a specific use for this scenario, i do not need it for a specific script
r
Ryan Valizan
10/21/2023, 5:32 PM
Add a parameter to your api request then use a guard clause to handle your one off?
b
Bit
10/21/2023, 5:34 PM
it is a good idea.
If I continue your idea, i can make some hash-check or some key-exchange on top of the restlet