Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x] Incorrect uuid value for column webauthn_credentials.aaguid #96

Open
3 tasks done
codebarista opened this issue Sep 12, 2024 · 3 comments
Open
3 tasks done
Assignees
Labels
bug Something isn't working

Comments

@codebarista
Copy link

PHP & Platform

8.3.10 - Alpine Linux v3.20 x64

Database

MariaDB 10.11.8

Laravel version

11.23.4

Have you done this?

  • I have checked my logs and I'm sure is a bug in this package.
  • I can reproduce this bug in isolation (vanilla Laravel install)
  • I can suggest a workaround as a Pull Request

Expectation

When I register a passkey with Google Chrome Profile, I expect that it is stored to the database.

Description

Instead MariaDB sometimes throws a validation exception for aaguid. It works for one host, but not for another (always the same aaguid). So far only in latest Chrome with Chrome Profile for the passkey. The workaround would be to set the aaguid column type to char(36) for MariaDB.

Reproduction

\Laragear\WebAuthn\Models\WebAuthnCredential::create([
    'authenticatable_id' => 1,
    'authenticatable_type' => 'App\Models\User',
    'id' => 'lYcEEbf7tlNrVSLB9m-g_eptRRG7LMOuqNf3PvWLSsM',
    'user_id' => '66d3243c17184e60b90dffedce626d9e',
    'alias' => '',
    'counter' => 0,
    'rp_id' => 'codebarista.test',
    'origin' => 'https://codebarista.test',
    'transports' => '',
    'aaguid' => 'adce0002-35bc-c60a-648b-0b25f1f05503', // original incorrect uuid value
    'public_key' => 'eyJpdiI6IlV5TWpObG1LMS91ODJSelhNNXlkQmc9P...',
    'attestation_format' => 'none',
    'updated_at' => '2024-09-12 17:34:34',
    'created_at' => '2024-09-12 17:34:34',
]);

Stack trace & logs

SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect uuid value: 'adce0002-35bc-c60a-648b-0b25f1f05503' for column `webauthn_credentials`.`aaguid` at row 1 (Connection: mariadb, SQL: insert into `webauthn_credentials`...)
@codebarista codebarista added the bug Something isn't working label Sep 12, 2024
@codebarista codebarista changed the title [3.x] Incorrect uuid value for column webauthn_credentials [3.x] Incorrect uuid value for column webauthn_credentials. aaguid Sep 12, 2024
@codebarista codebarista changed the title [3.x] Incorrect uuid value for column webauthn_credentials. aaguid [3.x] Incorrect uuid value for column webauthn_credentials.aaguid Sep 12, 2024
@DarkGhostHunter
Copy link
Contributor

DarkGhostHunter commented Sep 12, 2024 via email

codebarista added a commit to codebarista/laragear-webauthn that referenced this issue Sep 12, 2024
@codebarista
Copy link
Author

Get well soon. 🙂

@DarkGhostHunter
Copy link
Contributor

DarkGhostHunter commented Sep 13, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants