Upgraded Tauri to v2.12.5 and fixed the zip security alerts (#1134)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-10-30 16:35:28 +01:00
1 parent bca728ba2c
commit 1c8b6ef774
7 files changed
+502 -433

No files matched your search

+6 -3
View File
@@ -128,7 +128,7 @@ async fn share_file_on_platform(_path: PathBuf) -> Result<(), ShareFailure> {
#[cfg(windows)]
async fn share_file_on_platform(path: PathBuf) -> Result<(), ShareFailure> {
use std::cell::RefCell;
use std::cell::{Cell, RefCell};
use std::time::{Duration, Instant};
use log::{debug, warn};
use windows::ApplicationModel::DataTransfer::{DataPackage, DataRequestedEventArgs, DataTransferManager, ShareCompletedEventArgs};
@@ -151,7 +151,7 @@ async fn share_file_on_platform(path: PathBuf) -> Result<(), ShareFailure> {
fn provide_shared_file(arguments: &DataRequestedEventArgs, path: &str) -> windows::core::Result<()> {
let request = arguments.Request()?;
let lookup_started = Instant::now();
let file = StorageFile::GetFileFromPathAsync(&HSTRING::from(path))?.get()?;
let file = StorageFile::GetFileFromPathAsync(&HSTRING::from(path))?.join()?;
let lookup_duration = lookup_started.elapsed();
if lookup_duration > DATA_PACKAGE_DEADLINE {
warn!(Source = "Share sheet"; "Looking up the shared file took {} ms, but Windows allows only {} ms to provide the data.", lookup_duration.as_millis(), DATA_PACKAGE_DEADLINE.as_millis());
@@ -231,7 +231,10 @@ async fn share_file_on_platform(path: PathBuf) -> Result<(), ShareFailure> {
// that lock.
//
let share_started = Instant::now();
let mut data_requested = Some(data_requested_sender);
// Windows accepts only handlers which do not change what they captured, yet the first
// request has to take the sender. The cell allows that through a shared reference:
let data_requested = Cell::new(Some(data_requested_sender));
let handler = TypedEventHandler::<DataTransferManager, DataRequestedEventArgs>::new(move |_, arguments| {
let Some(arguments) = arguments.as_ref() else {
return Ok(());