fix(updater): make pubkey optional in tauri config, check if set at runtime (fixes #2438)#3114
fix(updater): make pubkey optional in tauri config, check if set at runtime (fixes #2438)#3114wovw wants to merge 7 commits intotauri-apps:v2from
Conversation
| log::warn!( | ||
| "Updater pubkey is set at runtime. It will overwrite the config pubkey if set." | ||
| ); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
|
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? |
Package Changes Through 728a6beThere 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 VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
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.