#js API callable despite allowlist configurations

16 messages · Page 1 of 1 (latest)

hasty osprey
#

I have the following allowlist in my configuration file which to my understanding should disallow calling functions from the process js API:


    "allowlist": {
      "all": false,
      "app": {
        "all": true,
        "hide": false,
        "show": false
      },
      "clipboard": {
        "writeText": true
      },
      "dialog": {
        "open": true
      }
    },

Nevertheless for some weird reason, I can call exit(1) from the process API and the program quits. I cannot reproduce this behavior in a separate project with the same allowlist and also otherwise almost exactly the same tauri.conf.json.
Any ideas on what could cause this behavior would be appreciated. I did do a cargo clean hoping it was caused by some caching issues but no luck.

magic canyon
#

Any ideas on what could cause this behavior would be appreciated. I did do a cargo clean hoping it was caused by some caching issues but no luck.
Did you also close the terminal and code editor? I (rarely) saw similar issues where i had to restart powershell for all changes to take effect. wasn't able to find the cause for that tho

hasty osprey
#

I think I even rebooted my laptop but I'll try it again

magic canyon
#

hmm

floral sparrow
#

Can you show how you're calling the function from the JS side?

magic canyon
#

then maybe check the enabled features of the tauri dependency in cargo.toml

#

or no, that doesn't make sense, it will have the feature enabled otherwise it wouldn't work x)

hasty osprey
hasty osprey
hasty osprey
#

I also tried to clone it freshly from github in the meantime and I can still successfully call the exit() function with the above mentioned allowlist :(

magic canyon
#

do you use cargo's new workspace inheritance feature?

hasty osprey
#

yes

#

wait no

#

I mixed up my projects

#

The tauri part is only a workspace member though but I don't use any shared package dependencies

magic canyon
#

looks like it is a workspace issue, just not related to the inheritance feature.
Your project has 2 src-tauri folders, one of which enables the whole allowlist which in turn changes the feature flags for the whole workspace