UnofficialCrusaderPatch / UnofficialCrusaderPatch3

Development for the dll Injection approach
GNU General Public License v3.0
12 stars 2 forks source link

Check scoping issues with file saving: configs cannot be saved to all locations on a PC #45

Closed gynt closed 1 year ago

gynt commented 1 year ago

This is probably Tauri security being annoying?

TheRedDaemon commented 1 year ago

Is this an issue of the GUI, or the UCP3?
If it is the former, it should maybe be moved over to the GUI Repo (I would then copy the following content over).

Tauri prides itself for its relative safety. In theory, if an external source can get hold of the Tauri functions (file functions, etc), it can use them for everything (Once we are GUI feature complete for some real beta or 1.0, we also need to play with the security options a bit, for example, web access to random websites is not something we need at the moment).

Tauri restricts the accessible folders to something defined by config or dynamically through (backend?) code. The later is at least used for the recent folders. When you select a folder/file via the Tauri file dialog, it is automatically added to this list for the lifetime of the application. Their docs basically say for more safety, one would need to write an own implementation. (I assume the general parts are already present.)

Now the complain here is "too much restrictions": We might be able to disable the check (or use some "allow all"-pattern). Do we want that?
I also thought a save via dialog should work. What is the case? Does the app remember a file outside the currently active folder that was not "opened" via a dialog?

gynt commented 1 year ago

Ah yes, this was made in the wrong repo, I will copy this over.