7
Planned

Let plugins SET Global Variables

I know long ago there was a brief time where this was possible, but Pent changed the 'rules' because of a supposed 'security' issue.

Is it possible to now solve this security issue? To make a more secure/safe connection between the plugin and Tasker to let set Global variables.

It could even be an option that plugin devs and/or the user have to click something to agree to.

Case in point, let's say you want to set 6 Globals at once. If they were local variables - AutoTools "Text" could handle it in one Action if it could set Globals. 

Otherwise right now the only option is to have 6 separate "Variable Set" Actions. 

2 replies

IG

I want to addendum this with a more amicable approach. Plugins rightfully can not set globals for the simple reason that 3rd party apps could inject dangerous payloads to memory. 

My solution, a set of predefined Globals that when a plugin sets a local with that prefix, Tasker automatically Globalises it. 

So, say any local that begins with %plugin_ gets up converted to Global by Tasker. Any globals set with a start of %PLUGIN_ could be downconverted for the plugin to see it.

I'd also recommend that this is a toggleable feature under External access; Allow Prefixed Globals for Plugins. As rightfully, plugins setting globals is a potentially dangerous thing and some may not want it, whilst still letting plugs work.

Thanks

TP

As a work-around - a Javascriptlet Action can be used with "setGlobal()" to set any number of Globals in a single Action.

So right after a plugin action, if 5 or 10 or how many of the local variables the plugin generates need to be turned into Globals - it can be done in the one simple Javascriptlet action.