extend credential id field length because of insufficient length for Solo 2 key

This commit is contained in:
Daniel Seifert 2023-01-25 21:35:14 +01:00
parent 4ab7ad59e8
commit 93a973ea40
Signed by: DanielS
GPG Key ID: 6A513E13AEE66170
4 changed files with 6 additions and 4 deletions

View File

@ -108,6 +108,7 @@ class d3user_webauthn extends AdminDetailsController
$credential = Registry::getRequest()->getRequestEscapedParameter('credential');
if (strlen((string) $credential)) {
/** @var Webauthn $webauthn */
$webauthn = d3GetOxidDIC()->get(Webauthn::class);
$webauthn->saveAuthn($credential, Registry::getRequest()->getRequestEscapedParameter('keyname'));
}

View File

@ -135,9 +135,9 @@ class PublicKeyCredential extends BaseModel
public function saveCredentialSource(PublicKeyCredentialSource $publicKeyCredentialSource, string $keyName = null): void
{
// item exist already
if (d3GetOxidDIC()->get(PublicKeyCredentialList::class)
->findOneByCredentialId($publicKeyCredentialSource->getPublicKeyCredentialId())
) {
/** @var PublicKeyCredentialList $pkcl */
$pkcl = d3GetOxidDIC()->get(PublicKeyCredentialList::class);
if ($pkcl->findOneByCredentialId($publicKeyCredentialSource->getPublicKeyCredentialId())) {
return;
}

View File

@ -196,6 +196,7 @@ class Webauthn
$serverRequest
);
/** @var PublicKeyCredential $pkCredential */
$pkCredential = d3GetOxidDIC()->get(PublicKeyCredential::class);
$pkCredential->saveCredentialSource($publicKeyCredentialSource, $keyName);
}

View File

@ -56,7 +56,7 @@ class Actions
`OXUSERID` char(32) NOT NULL,
`OXSHOPID` int(11) NOT NULL,
`NAME` varchar(100) NOT NULL,
`CREDENTIALID` char(128) NOT NULL,
`CREDENTIALID` varchar(512) NOT NULL,
`CREDENTIAL` varchar(2000) NOT NULL,
`OXTIMESTAMP` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`OXID`),