Skip to content

Commit

Permalink
fix: scope check when using the HTTP API to upload files closes #4312
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Jun 10, 2022
1 parent c2b7c77 commit 8ce5b76
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/fix-http-multipart-file-validation.md
@@ -0,0 +1,5 @@
---
"tauri": patch
---

Fixes filesystem scope check when using the HTTP API to upload files.
2 changes: 1 addition & 1 deletion core/tauri/src/endpoints/http.rs
Expand Up @@ -103,7 +103,7 @@ impl Cmd {
} = value
{
if crate::api::file::SafePathBuf::new(path.clone()).is_err()
|| scopes.fs.is_allowed(&path)
|| !scopes.fs.is_allowed(&path)
{
return Err(crate::Error::PathNotAllowed(path.clone()).into_anyhow());
}
Expand Down

0 comments on commit 8ce5b76

Please sign in to comment.