Installer IntentFilters must also match on host and port
Without this rule, two https:// URLs with the same path and APK name would both match. With multiple repo and swap support, this could easily happen.
This commit is contained in:
parent
738a92f5d2
commit
07cadd862a
@ -300,6 +300,7 @@ public abstract class Installer {
|
|||||||
intentFilter.addAction(Installer.ACTION_INSTALL_INTERRUPTED);
|
intentFilter.addAction(Installer.ACTION_INSTALL_INTERRUPTED);
|
||||||
intentFilter.addAction(Installer.ACTION_INSTALL_USER_INTERACTION);
|
intentFilter.addAction(Installer.ACTION_INSTALL_USER_INTERACTION);
|
||||||
intentFilter.addDataScheme(uri.getScheme());
|
intentFilter.addDataScheme(uri.getScheme());
|
||||||
|
intentFilter.addDataAuthority(uri.getHost(), String.valueOf(uri.getPort()));
|
||||||
intentFilter.addDataPath(uri.getPath(), PatternMatcher.PATTERN_LITERAL);
|
intentFilter.addDataPath(uri.getPath(), PatternMatcher.PATTERN_LITERAL);
|
||||||
return intentFilter;
|
return intentFilter;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user