mirror of
https://github.com/bitwarden/android.git
synced 2024-11-24 18:36:32 +03:00
PM-11394 String parse issue with app link (#3839)
This commit is contained in:
parent
522e3bb939
commit
e32a9f303d
1 changed files with 5 additions and 1 deletions
|
@ -9,7 +9,11 @@ import com.x8bit.bitwarden.data.platform.manager.model.CompleteRegistrationData
|
|||
* The [CompleteRegistrationData] will be returned when present.
|
||||
*/
|
||||
fun Intent.getCompleteRegistrationDataIntentOrNull(): CompleteRegistrationData? {
|
||||
val sanitizedUriString = data.toString().replace("/redirect-connector.html#", "/")
|
||||
val sanitizedUriString = data.toString().replace(
|
||||
oldValue = "/redirect-connector.html#",
|
||||
newValue = "/",
|
||||
ignoreCase = true,
|
||||
)
|
||||
val uri = runCatching { Uri.parse(sanitizedUriString) }.getOrNull() ?: return null
|
||||
uri.host ?: return null
|
||||
if (uri.path != "/finish-signup") return null
|
||||
|
|
Loading…
Reference in a new issue