Skip to content

Commit

Permalink
fix: issue decrypt wrong format
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx committed Jul 14, 2023
1 parent fa4170f commit 85a363e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,10 @@ private void decryptFile(
this.privateKey == null ||
this.privateKey.isEmpty() ||
ivSessionKey == null ||
ivSessionKey.isEmpty()
ivSessionKey.isEmpty() ||
ivSessionKey.split(":").length != 2
) {
Log.i(TAG, "Cannot found privateKey or sessionKey");
return;
}
try {
Expand Down
2 changes: 1 addition & 1 deletion ios/Plugin/CapacitorUpdater.swift
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ extension CustomError: LocalizedError {
}

private func decryptFile(filePath: URL, sessionKey: String, version: String) throws {
if self.privateKey.isEmpty || sessionKey.isEmpty {
if self.privateKey.isEmpty || sessionKey.isEmpty || sessionKey.components(separatedBy: ":").count != 2 {
print("\(self.TAG) Cannot found privateKey or sessionKey")
return
}
Expand Down

0 comments on commit 85a363e

Please sign in to comment.