Skip to content

fix(updater): make pubkey optional in tauri config, check if set at runtime (fixes #2438)#3114

Open
wovw wants to merge 7 commits intotauri-apps:v2from
wovw:fix/updater-pubkey-at-runtime
Open

fix(updater): make pubkey optional in tauri config, check if set at runtime (fixes #2438)#3114
wovw wants to merge 7 commits intotauri-apps:v2from
wovw:fix/updater-pubkey-at-runtime

Conversation

@wovw
Copy link
Copy Markdown

@wovw wovw commented Nov 20, 2025

If pubkey isn't set in tauri config, there's a new error to make sure it's set at least at runtime.
Currently the pubkey set at runtime overwrites the one in config if it's set, shown with a warning.
Let me know if I need to make any edits anywhere.

@wovw wovw requested a review from a team as a code owner November 20, 2025 08:52
@wovw wovw changed the title feat: make pubkey optional in tauri config, check if set at runtime (fix #2438) fix: make pubkey optional in tauri config, check if set at runtime (fix #2438) Nov 20, 2025
@wovw wovw changed the title fix: make pubkey optional in tauri config, check if set at runtime (fix #2438) fix(updater): make pubkey optional in tauri config, check if set at runtime (fix #2438) Nov 20, 2025
@wovw wovw changed the title fix(updater): make pubkey optional in tauri config, check if set at runtime (fix #2438) fix(updater): make pubkey optional in tauri config, check if set at runtime (fixes #2438) Nov 20, 2025
Comment thread plugins/updater/src/lib.rs Outdated
Comment on lines +222 to +224
log::warn!(
"Updater pubkey is set at runtime. It will overwrite the config pubkey if set."
);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i don't think there's much value in that log here, at least not on warn level. Maybe debug level but i really wouldn't mind removing it.

Instead we should think about having a warning at compile time though that likely has to happen in tauri's cli.
Speaking of which, we'd also need to change the cli https://github.com/tauri-apps/tauri/blob/afdd288eab7d8473fd6ad2796571a24c4873a8db/crates/tauri-cli/src/interface/rust.rs#L783

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I nested the warning log further, it could serve as an incentive for the developer to keep it only in one or the other, but we could also just make it a debug log.

@wovw
Copy link
Copy Markdown
Author

wovw commented Nov 20, 2025

I took at look at making changes in tauri-cli. From my understanding, it looks like in https://github.com/tauri-apps/tauri/blob/afdd288eab7d8473fd6ad2796571a24c4873a8db/crates/tauri-cli/src/bundle.rs#L223 the pubkey is validated against the private key when bundling. We could make this check optional if the pubkey doesn't exist in the config + show a warning. Should I go ahead with this?

@github-actions
Copy link
Copy Markdown
Contributor

Package Changes Through 728a6be

There are 14 changes which include sql with minor, sql-js with minor, deep-link with patch, deep-link-js with patch, fs with minor, fs-js with minor, http with patch, http-js with patch, updater with patch, updater-js with patch, nfc with patch, nfc-js with patch, dialog with minor, dialog-js with minor

Planned Package Versions

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

package current next
api-example 2.0.41 2.0.42
api-example-js 2.0.37 2.0.38
deep-link-example-js 2.2.10 2.2.11
deep-link 2.4.7 2.4.8
deep-link-js 2.4.7 2.4.8
fs 2.4.5 2.5.0
fs-js 2.4.5 2.5.0
dialog 2.6.0 2.7.0
dialog-js 2.6.0 2.7.0
http 2.5.7 2.5.8
http-js 2.5.7 2.5.8
nfc 2.3.4 2.3.5
nfc-js 2.3.4 2.3.5
persisted-scope 2.3.5 2.3.6
single-instance 2.4.0 2.4.1
sql 2.3.2 2.4.0
sql-js 2.3.2 2.4.0
updater 2.10.0 2.10.1
updater-js 2.10.0 2.10.1

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


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants