@onekeyfe/react-native-bundle-update 1.1.43 → 1.1.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -296,7 +296,8 @@ object BundleUpdateStoreAndroid {
296
296
  val appVersion = payload.optString("appVersion")
297
297
  val bundleVersion = payload.optString("bundleVersion")
298
298
  val signature = payload.optString("signature")
299
- if (appVersion.isEmpty() || bundleVersion.isEmpty()) return
299
+ if (appVersion.isEmpty() || bundleVersion.isEmpty() || signature.isEmpty()) return
300
+ if (!isSafeVersionString(appVersion) || !isSafeVersionString(bundleVersion)) return
300
301
 
301
302
  // 5. Verify bundle directory and entry file exist
302
303
  val folderName = "$appVersion-$bundleVersion"
@@ -254,7 +254,8 @@ public class BundleUpdateStore: NSObject {
254
254
  let appVersion = payload["appVersion"] as? String,
255
255
  let bundleVersion = payload["bundleVersion"] as? String,
256
256
  let signature = payload["signature"] as? String,
257
- !appVersion.isEmpty, !bundleVersion.isEmpty
257
+ !appVersion.isEmpty, !bundleVersion.isEmpty, !signature.isEmpty,
258
+ appVersion.isSafeVersionString, bundleVersion.isSafeVersionString
258
259
  else { return }
259
260
 
260
261
  // 5. Verify bundle directory and entry file exist
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-bundle-update",
3
- "version": "1.1.43",
3
+ "version": "1.1.44",
4
4
  "description": "react-native-bundle-update",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",