Skip to content
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

Merged
merged 21 commits into from
Aug 16, 2024
Merged

Conversation

WcaleNieWolny
Copy link
Contributor

No description provided.

@@ -1452,7 +1452,7 @@ public void appMovedToForeground() {
this._checkCancelDelay(false);
if (
CapacitorUpdaterPlugin.this._isAutoUpdateEnabled() &&
this.backgroundDownloadTask == null
(this.backgroundDownloadTask == null || !this.backgroundDownloadTask.isAlive())
Copy link
Contributor Author

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

@WcaleNieWolny WcaleNieWolny changed the title 🔒️ (feat): Add bundle signature verification (IOS) 🔒️ (feat): Add bundle signature verification Aug 11, 2024
@@ -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"
Copy link
Collaborator

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) {
Copy link
Collaborator

@riderx riderx Aug 16, 2024

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(
Copy link
Collaborator

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";
Copy link
Collaborator

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

@riderx
Copy link
Collaborator

riderx commented Aug 16, 2024

Modifiy what asked and fix conflict then you can merge it yourself

Copy link

@WcaleNieWolny WcaleNieWolny merged commit 38935e8 into main Aug 16, 2024
8 checks passed
@riderx riderx deleted the bundle_signing branch October 7, 2024 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants