We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a47dd2 commit fe18012Copy full SHA for fe18012
.changes/fix-fs-scope-check-symlink.md
@@ -0,0 +1,5 @@
1
+---
2
+"tauri": patch:bug
3
4
+
5
+Resolve symlinks on the filesystem scope check.
core/tauri/src/scope/fs.rs
@@ -298,6 +298,14 @@ impl Scope {
298
/// Determines if the given path is allowed on this scope.
299
pub fn is_allowed<P: AsRef<Path>>(&self, path: P) -> bool {
300
let path = path.as_ref();
301
+ let path = if path.is_symlink() {
302
+ match std::fs::read_link(path) {
303
+ Ok(p) => p,
304
+ Err(_) => return false,
305
+ }
306
+ } else {
307
+ path.to_path_buf()
308
+ };
309
let path = if !path.exists() {
310
crate::Result::Ok(path.to_path_buf())
311
} else {
0 commit comments