Skip to content

Commit 8ce5b76

Browse files
committed
fix: scope check when using the HTTP API to upload files closes #4312
1 parent c2b7c77 commit 8ce5b76

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Fixes filesystem scope check when using the HTTP API to upload files.

core/tauri/src/endpoints/http.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ impl Cmd {
103103
} = value
104104
{
105105
if crate::api::file::SafePathBuf::new(path.clone()).is_err()
106-
|| scopes.fs.is_allowed(&path)
106+
|| !scopes.fs.is_allowed(&path)
107107
{
108108
return Err(crate::Error::PathNotAllowed(path.clone()).into_anyhow());
109109
}

0 commit comments

Comments
 (0)