-
-
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
Override xorm type mapping for U2F counter #6232
Conversation
Fix U2F autentication failure with token couter value >= 2^31 when using postgres
Codecov Report
@@ Coverage Diff @@
## master #6232 +/- ##
==========================================
- Coverage 38.86% 38.83% -0.03%
==========================================
Files 354 355 +1
Lines 50223 50239 +16
==========================================
- Hits 19517 19511 -6
- Misses 27879 27901 +22
Partials 2827 2827
Continue to review full report at Codecov.
|
Maybe you should consider to add a migration. |
Yes, this would need to add migration to update exisiting database |
Yesterday, I'm also investigate this bug. My yubikey could work with github but not gitea. I will try this PR to check if it fixed the bug. |
But it seems this doesn't fix my issue. |
@lafriks I believe updating the sqlite3 schema is not needed since it has a single integer type which is big enough to hold an uint32. Sorry for my poor xorm knowledge: haven't used it before. :) @lunny have you checked if your logs look like https://gist.github.com/mporrato/251450f7786075a887ad21a1728a5407 ? If that's the case, can you connect to the gitea db and do a |
No need to be sorry about, that's why there is review process to learn things :) |
I don’t think we need tidb case because for tidb v2 the protocol would be MySQL. Also should sessions be used? |
@techknowlogick no session is needed for single sql command |
Is this problem still open? I am still getting "Could not read your security key." with gitea 1.12.1 with sqlite3 on debian stable (buster). My solo key NFC works with github. Update (Solved): The server had two names which can be used synonymously -- but not with the u2f. The error "could not read" disappears if the same name is used for registering and using the dongle. |
Fix U2F authentication failure with token counter value >= 2^31 when using PostgreSQL.
Closes #6168