This logic in StringExtensions.kt can cause issues with certain deep links/app links when a query parameter value contains a character that is decoded as &. This causes an IndexOutOfBoundException when keyAndValue[1] is called as the split function called during keyAndValue assignment will not have found the delimiter =
fun String.parseAsQueryParameters(): Map<String, String> {
return split("&").map {
val keyAndValue = it.split("=")
Pair(keyAndValue.first(), keyAndValue[1])
}.associate { it }
}
This logic in
StringExtensions.kt
can cause issues with certain deep links/app links when a query parameter value contains a character that is decoded as&
. This causes anIndexOutOfBoundException
whenkeyAndValue[1]
is called as thesplit
function called duringkeyAndValue
assignment will not have found the delimiter=