[WebAuthn] fix error on android

master
FreddleSpl0it 2022-01-18 11:40:06 +01:00
parent 0e4ddacf92
commit 5712192bcb
No known key found for this signature in database
GPG Key ID: 38F5FCC689C181F9
1 changed files with 2 additions and 2 deletions

View File

@ -1359,8 +1359,8 @@ function fido2($_data) {
if (!isset($_data['cid']) || empty($_data['cid'])) { if (!isset($_data['cid']) || empty($_data['cid'])) {
return false; return false;
} }
$stmt = $pdo->prepare("SELECT `certificateSubject`, `username`, `credentialPublicKey`, SHA2(`credentialId`, 256) AS `cid` FROM `fido2` WHERE TO_BASE64(`credentialId`) = :cid"); $stmt = $pdo->prepare("SELECT `certificateSubject`, `username`, `credentialPublicKey`, SHA2(`credentialId`, 256) AS `cid` FROM `fido2` WHERE `credentialId` = :cid");
$stmt->execute(array(':cid' => $_data['cid'])); $stmt->execute(array(':cid' => base64_decode($_data['cid'])));
$row = $stmt->fetch(PDO::FETCH_ASSOC); $row = $stmt->fetch(PDO::FETCH_ASSOC);
if (empty($row) || empty($row['credentialPublicKey']) || empty($row['username'])) { if (empty($row) || empty($row['credentialPublicKey']) || empty($row['username'])) {
return false; return false;