Skip to content

Fix: Updater signer failed signing file without extension#14713

Merged
Legend-Master merged 4 commits intotauri-apps:devfrom
wasuaje:fix/updater-signer-fails-on-files-without-extension
Jan 14, 2026
Merged

Fix: Updater signer failed signing file without extension#14713
Legend-Master merged 4 commits intotauri-apps:devfrom
wasuaje:fix/updater-signer-fails-on-files-without-extension

Conversation

@wasuaje
Copy link
Copy Markdown
Contributor

@wasuaje wasuaje commented Dec 29, 2025

If we tried to sign a file without extension (for example in linux)
Before:

bin_path.extension().unwrap().to_os_string();

returned None and unwrap of course failed.

Change:

  let signature_path = if bin_path.extension().is_some() {
    let mut extension = bin_path.extension().unwrap().to_os_string();
    extension.push(".sig");
    bin_path.with_extension(extension)
  } else {
    bin_path.with_extension("sig")
  };

So if we have an extension we just add ".sig" as another extension. Otherwise with just add it to the filename.

@wasuaje wasuaje requested a review from a team as a code owner December 29, 2025 15:55
@github-project-automation github-project-automation Bot moved this to 📬Proposal in Roadmap Dec 29, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 29, 2025

Package Changes Through d8c2568

There are 7 changes which include tauri-utils with patch, tauri-build with patch, tauri-cli with patch, @tauri-apps/cli with patch, tauri-runtime-wry with patch, tauri-runtime with patch, tauri with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tauri-utils 2.8.1 2.8.2
tauri-bundler 2.7.5 2.7.6
tauri-runtime 2.9.2 2.9.3
tauri-runtime-wry 2.9.3 2.9.4
tauri-codegen 2.5.2 2.5.3
tauri-macros 2.5.2 2.5.3
tauri-plugin 2.5.2 2.5.3
tauri-build 2.5.3 2.5.4
tauri 2.9.5 2.9.6
@tauri-apps/cli 2.9.6 2.9.7
tauri-cli 2.9.6 2.9.7

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

Comment thread crates/tauri-cli/src/helpers/updater_signature.rs Outdated
Copy link
Copy Markdown
Contributor

@Legend-Master Legend-Master left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Could you also add a change file?

https://github.com/tauri-apps/tauri/blob/dev/.changes/README.md

Comment on lines +123 to +124
// Previously if the file didn't have an extension, it broke as
// bin_path.extension().unwrap().to_os_string(); returned None and unwrwap failed.
Copy link
Copy Markdown
Contributor

@Legend-Master Legend-Master Jan 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the code is self explanatory enough that we could remove this comment

And maybe we could add a TODO comment here like 'TODO: use with_added_extension when we bump MSRV to > 1.91'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Legend-Master
Legend-Master previously approved these changes Jan 13, 2026
Copy link
Copy Markdown
Contributor

@Legend-Master Legend-Master left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment thread .changes/updater-signer-files-without-extension.md Outdated
Comment thread .changes/updater-signer-files-without-extension.md
@Legend-Master
Copy link
Copy Markdown
Contributor

image

You'll need to re-sign your first commit 0b0bf8a and force push so I can merge this one

@wasuaje
Copy link
Copy Markdown
Contributor Author

wasuaje commented Jan 13, 2026

@Legend-Master Do you have a guide on how to sign only my first commit? Thanks in advance

@Legend-Master
Copy link
Copy Markdown
Contributor

I used to use the method mentioned in https://stackoverflow.com/a/54987693

@wasuaje wasuaje force-pushed the fix/updater-signer-fails-on-files-without-extension branch from b73b06f to d8c2568 Compare January 13, 2026 18:32
@wasuaje
Copy link
Copy Markdown
Contributor Author

wasuaje commented Jan 13, 2026

@Legend-Master Done!

Thanks for the guide

@Legend-Master Legend-Master merged commit 1b0e335 into tauri-apps:dev Jan 14, 2026
13 checks passed
@github-project-automation github-project-automation Bot moved this from 📬Proposal to 🔎 In audit in Roadmap Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔎 In audit

Development

Successfully merging this pull request may close these issues.

3 participants