fix: scope check when using the HTTP API to upload files closes #4312

This commit is contained in:
Lucas Nogueira
2022-06-10 15:54:26 -03:00
parent c2b7c77517
commit 8ce5b76264
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"tauri": patch
---
Fixes filesystem scope check when using the HTTP API to upload files.

View File

@@ -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());
}