-
Notifications
You must be signed in to change notification settings - Fork 16
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
(back) Filter updates by bundleId #559
Comments
This makes sense -- I think it's a good solution. The alternative would be to store the The main work is to pass the |
Yes that makes sense. Or
The PR I made against your branch from |
I think that this is important enough that in addition to limiting it by discover key, we should also check the bundleId of incoming APKs. Otherwise it carries a small security risk:
I think we should read the following from incoming APKs before installing:
Andre Staltz wrote a small native module to read similar information from an APK: https://github.com/staltz/react-native-android-packagemanager/blob/master/android/src/main/java/com/reactlibrary/RNAndroidPackagemanagerModule.java I think we should vendorize that code for now (e.g. copy it into Mapeo codebase) and modify it to also read these values. Bundle ID is the most important in my opinion, since if the other metadata is incorrect install will just fail, but bundleId being different will cause unexpected things to happen. I can look at the java code for this tomorrow |
Agreed.
What would you want to do with these values? |
We release different "variants" of Mapeo, that are distinguished by different "bundle id"s or "application id"s. Each variant with a different bundle id installs as a separate app on the phone, so you can have two variants of Mapeo running alongside each other with their own data, e.g. the QA variant and the main variant.
If we do not check that the bundle id of the update matches the running application, then we could end up upgrading / installing a different app to the one that is currently running. E.g. if someone is using the QA variant, and they get an update from someone running the main variant, then the QA variant would install the update over the main variant on their phone, which is not what the user would be expecting (the QA variant that they are running would not update).
To avoid this, we need to only accept updates that share the same bundle id. I think that it makes sense to avoid discovery of different variants altogether, e.g. QA variants should only discover other QA variants for finding updates. Could we incorporate the bundleId into the discovery key?
Current variants we build:
com.mapeo
: the "main" variant of the app - blue iconcom.mapeo.qa
: used for QA testing without overwriting the main variant - red iconcom.mapeo.debug
: used for development when running locally - yellow iconcom.mapeo.icca
: The "Mapeo for ICCAs" variant created for WCMC - green iconThere are also
.debug
variants of the QA and ICCA builds. These are only built as internal builds used for debugging errors with release candidates.Kira's work checklist:
${bundleId}-upgrade
The text was updated successfully, but these errors were encountered: