PM-36474: bug: Ensure shared totp labels do not parse secret (#6873)

This commit is contained in:
David Perez
2026-05-05 14:20:46 -05:00
committed by GitHub
parent 47ef8914a9
commit d0401b310e

View File

@@ -25,7 +25,8 @@ fun List<SharedAccountData.Account>.toAuthenticatorItems(): List<AuthenticatorIt
.pathSegments
.firstOrNull()
?.removePrefix("$issuer:")
?.takeUnless { it.isBlank() }
// If there is no scheme, then the whole uri is the secret.
?.takeUnless { it.isBlank() || uri.scheme == null }
?: cipherData.username
AuthenticatorItem(