]> source.dussan.org Git - gitea.git/commit
Increase the size of the webauthn_credential credential_id field (#18739)
authorzeripath <art27@cantab.net>
Sun, 13 Feb 2022 21:19:12 +0000 (21:19 +0000)
committerGitHub <noreply@github.com>
Sun, 13 Feb 2022 21:19:12 +0000 (21:19 +0000)
commit32599bf0602e70a6862f3a02eb8928a67289095f
treefd418e78655092fc3c4a3c0f13f8aff7a67a24df
parent1b1658d8875e42f0c5130ddfe9c7339e10bf5c20
Increase the size of the webauthn_credential credential_id field (#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 <art27@cantab.net>
Makefile
models/migrations/fixtures/Test_increaseCredentialIDTo410/expected_webauthn_credential.yml [new file with mode: 0644]
models/migrations/fixtures/Test_increaseCredentialIDTo410/u2f_registration.yml [new file with mode: 0644]
models/migrations/fixtures/Test_increaseCredentialIDTo410/webauthn_credential.yml [new file with mode: 0644]
models/migrations/migrations.go
models/migrations/v207.go
models/migrations/v208.go
models/migrations/v209.go [new file with mode: 0644]
models/migrations/v209_test.go [new file with mode: 0644]