fix: Security exception

This commit is contained in:
J-Jamet
2025-09-01 15:53:45 +02:00
parent b80acd5a2d
commit 1a717bda03
2 changed files with 9 additions and 11 deletions

View File

@@ -579,14 +579,12 @@ object PasskeyHelper {
return if (appToCheck.verified) {
usageParameters.clientDataResponse
} else {
appToCheck.checkAppOrigin(appOrigin)?.let { origin ->
// Origin checked by Android app signature
ClientDataBuildResponse(
type = ClientDataBuildResponse.Type.GET,
challenge = usageParameters.publicKeyCredentialRequestOptions.challenge,
origin = origin
)
} ?: throw SecurityException("Wrong signature for $appToCheck")
// Origin checked by Android app signature
ClientDataBuildResponse(
type = ClientDataBuildResponse.Type.GET,
challenge = usageParameters.publicKeyCredentialRequestOptions.challenge,
origin = appToCheck.checkAppOrigin(appOrigin)
)
}
}
}