-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Migration from 1.15 to 1.16 fails on webauthn table #18727
Comments
Duplicate #18477 |
How is this a duplicate? This is a bug report about a failed database migration. |
Sorry I apologise I misread your message. What db are you using? |
mariadb 10.5 is the database. The migration would probably "work" if chosing another sql_mode which allows just overflowing columns to be truncated - which then would break webauthn for affected users. That's why I pointed to the other issue which might be related - a seemingly okay migration with truncation. |
Unfortunately credentialIDs in u2f are 255 bytes long which with base32 encoding becomes 408 bytes. The default size of a xorm string field is only a VARCHAR(255) This problem is not apparent on SQLite because strings get mapped to TEXT there. Fix go-gitea#18727 Signed-off-by: Andrew Thornton <[email protected]>
@christiaangoossens You mean after updating to Gitea 1.16.1 or specifically to the mentioned PR? If the former, this is unlikely related to this issue, please check the other open issues or create a new one. Or check the configuration and changelog about breaking changes. |
@fnetX My issue seemed to be related due to the very similar scenario and that I saw that same migration error happen, but as it's solved and probably had more to do with my outdated config, I have removed the comment. Thanks for your comment! |
) Unfortunately credentialIDs in u2f are 255 bytes long which with base32 encoding becomes 408 bytes. The default size of a xorm string field is only a VARCHAR(255) This problem is not apparent on SQLite because strings get mapped to TEXT there. Fix #18727 Signed-off-by: Andrew Thornton <[email protected]>
…gitea#18739) Backport go-gitea#18739 Unfortunately credentialIDs in u2f are 255 bytes long which with base32 encoding becomes 408 bytes. The default size of a xorm string field is only a VARCHAR(255) This problem is not apparent on SQLite because strings get mapped to TEXT there. Fix go-gitea#18727 Signed-off-by: Andrew Thornton <[email protected]>
) (#18756) * Increase the size of the webauthn_credential credential_id field (#18739) Backport #18739 Unfortunately credentialIDs in u2f are 255 bytes long which with base32 encoding becomes 408 bytes. The default size of a xorm string field is only a VARCHAR(255) This problem is not apparent on SQLite because strings get mapped to TEXT there. Fix #18727 Signed-off-by: Andrew Thornton <[email protected]> * Ignore the migrate if u2f_registration is not exist (#18760) Co-authored-by: Lunny Xiao <[email protected]>
…gitea#18739) Unfortunately credentialIDs in u2f are 255 bytes long which with base32 encoding becomes 408 bytes. The default size of a xorm string field is only a VARCHAR(255) This problem is not apparent on SQLite because strings get mapped to TEXT there. Fix go-gitea#18727 Signed-off-by: Andrew Thornton <[email protected]>
Gitea Version
1.16.1
Git Version
2.30.2
Operating System
Debian 11
How are you running Gitea?
Self-compiled from https://codeberg.org/Codeberg/gitea/src/branch/codeberg-1.16
Database
MySQL
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Description
When doing a test migration for coderberg.org to 1.16 in an isolated vm, the migration fails with
The credential_id is a varchar(255) column.
Relaxing the sql mode would probably work but truncate the data, probably leading to u2f failing for affected users
(Might be related to #18477)
Screenshots
No response
The text was updated successfully, but these errors were encountered: