mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-10-04 10:06:53 -04:00
Don't crash on non-hierarchical URIs in RepoUriGetter
This commit is contained in:
2 files changed
+19
-3
No files matched your search
@@ -172,6 +172,11 @@ internal class RepoUriGetterTest {
|
||||
RepoUriGetter.getUri("")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testNonHierarchicalUri() {
|
||||
RepoUriGetter.getUri("mailto:nobody@google.com") // should not crash
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testSwapUri() {
|
||||
val uri =
|
||||
@@ -204,5 +209,8 @@ internal class RepoUriGetterTest {
|
||||
|
||||
val uri3 = Uri.parse("http://192.168.3.159:8888/fdroid/repo?BSSID=44:FE:3B:7F:7F:EE")
|
||||
assertFalse(RepoUriGetter.isSwapUri(uri3))
|
||||
|
||||
val uri4 = Uri.parse("mailto:nobody@google.com")
|
||||
assertFalse(RepoUriGetter.isSwapUri(uri4))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user