-
-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🔒️ (feat): Add bundle signature verification #423
Conversation
…into bundle_signing
@@ -1452,7 +1452,7 @@ public void appMovedToForeground() { | |||
this._checkCancelDelay(false); | |||
if ( | |||
CapacitorUpdaterPlugin.this._isAutoUpdateEnabled() && | |||
this.backgroundDownloadTask == null | |||
(this.backgroundDownloadTask == null || !this.backgroundDownloadTask.isAlive()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this just might solve #410
…into bundle_signing
@@ -15,7 +16,7 @@ import Version | |||
@objc(CapacitorUpdaterPlugin) | |||
public class CapacitorUpdaterPlugin: CAPPlugin { | |||
public var implementation = CapacitorUpdater() | |||
private let PLUGIN_VERSION: String = "6.0.58" | |||
private let PLUGIN_VERSION: String = "6.1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not update yourself, let CI do it
@@ -81,6 +87,15 @@ public class CapacitorUpdaterPlugin: CAPPlugin { | |||
implementation.statsUrl = getConfig().getString("statsUrl", CapacitorUpdaterPlugin.statsUrlDefault)! | |||
implementation.channelUrl = getConfig().getString("channelUrl", CapacitorUpdaterPlugin.channelUrlDefault)! | |||
implementation.defaultChannel = getConfig().getString("defaultChannel", "")! | |||
do { | |||
let signKeyString = getConfig().getString("signKey", "")! | |||
if (!signKeyString.isEmpty) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sign key should be optional
); | ||
|
||
this.sendStats("invalid_signature", version); | ||
throw new GeneralSecurityException( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional
@@ -55,7 +56,7 @@ public class CapacitorUpdaterPlugin extends Plugin { | |||
private static final String channelUrlDefault = | |||
"https://api.capgo.app/channel_self"; | |||
|
|||
private final String PLUGIN_VERSION = "6.0.58"; | |||
private final String PLUGIN_VERSION = "6.1.0"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let CI do the work
Modifiy what asked and fix conflict then you can merge it yourself |
|
No description provided.