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

fix(webauthn): Increase database column for public key id #47240

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Aug 14, 2024

Summary

There is no maximum length defined in the standard, most common the length is between 128 and 200 characters, but as we store it not in plain data but base64 encoded the length can grow about 1/3.

We had a regression with 'Nitrokey 3' which created IDs with 196 byte length -> 262 bytes encoded base64. So to be save we increase the size to 512 bytes.

Checklist

@susnux
Copy link
Contributor Author

susnux commented Aug 14, 2024

/backport to stable30

@susnux
Copy link
Contributor Author

susnux commented Aug 14, 2024

/backport to stable29

@susnux
Copy link
Contributor Author

susnux commented Aug 14, 2024

/backport to stable28

@susnux susnux requested review from Altahrim and removed request for come-nc August 14, 2024 16:10
Copy link
Member

@st3iny st3iny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A size of 512 is what we use at twofactor_webauthn too 👍

* Resolves #34476

There is no maximum length defined in the standard,
most common the length is between 128 and 200 characters,
but as we store it not in plain data but base64 encoded the length can grow about 1/3.

We had a regression with 'Nitrokey 3' which created IDs with 196 byte length -> 262 bytes encoded base64.
So to be save we increase the size to 512 bytes.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the fix/webauth-credentials-length branch from 255f44c to b582630 Compare August 14, 2024 20:13
@susnux susnux merged commit 2c24c3c into master Aug 14, 2024
169 checks passed
@susnux susnux deleted the fix/webauth-credentials-length branch August 14, 2024 22:19
@susnux
Copy link
Contributor Author

susnux commented Aug 14, 2024

/backport to stable28

@susnux
Copy link
Contributor Author

susnux commented Aug 14, 2024

/backport to stable29

@susnux
Copy link
Contributor Author

susnux commented Aug 14, 2024

/backport to stable30

@st3iny
Copy link
Member

st3iny commented Aug 15, 2024

The version number should also be incremented to actually run the migration. I forgot to check that.

# /version.php
$OC_Version = [31, 0, 0, 1];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Passwordless WebAuthn with Nitrokey 3 does not work
3 participants