mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
fix: scope check when using the HTTP API to upload files closes #4312
This commit is contained in:
5
.changes/fix-http-multipart-file-validation.md
Normal file
5
.changes/fix-http-multipart-file-validation.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Fixes filesystem scope check when using the HTTP API to upload files.
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user