diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/manager/intent/IntentManagerImpl.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/manager/intent/IntentManagerImpl.kt index 3902676e627..8345b09b010 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/manager/intent/IntentManagerImpl.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/manager/intent/IntentManagerImpl.kt @@ -150,7 +150,17 @@ class IntentManagerImpl( } } else { val newUri = if (uri.scheme == null) { - uri.buildUpon().scheme("https").build() + // Host can be mistaken as path if scheme is not set and URI does not start with "//". + if (uri.authority == null && uri.path != null) { + uri + .buildUpon() + .scheme("https") + .authority(uri.pathSegments[0]) + .path(uri.path!!.removePrefix(uri.pathSegments[0])) + .build() + } else { + uri.buildUpon().scheme("https").build() + } } else { uri.normalizeScheme() }