1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-06-27 16:35:57 +00:00
forgejo/models
Gusted 23e6ca0415
fix(sec): consider webauthn for external login
- Currently during external login (such as OAuth2), if the user is
enrolled into Webauthn and not enrolled into TOTP then no 2FA is being
done during external login and when account linking is set to `auto` then
also during automatic linking. This results in bypassing the 2FA of the
user.
- Create a new unified function that checks if the user is enrolled into
2FA and use this when necessary. Rename the old `HasTwoFactorByUID`
function to `HasTOTPByUID` which is a more appropiate naming.

(cherry picked from commit df5d656827)

Conflicts:
  the original commit was trimmed down to be fit for backport
2025-05-02 07:39:14 +02:00
..
actions chore(refactor): remove deadcode from port of Add API for Variables (#29520) 2025-02-08 07:50:19 +00:00
activities Update golang packages to v1.23 (v7.0/forgejo) (minor) (#7081) 2025-03-04 22:15:29 +00:00
admin Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
asymkey Update golang packages to v1.23 (v7.0/forgejo) (minor) (#7081) 2025-03-04 22:15:29 +00:00
auth fix(sec): consider webauthn for external login 2025-05-02 07:39:14 +02:00
avatars enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
db enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
dbfs enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
fixtures [v7.0/forgejo] fix: consider public issues for project boards (#7143) (#7145) 2025-03-07 00:20:25 +00:00
forgejo/semver enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
forgejo_migrations enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
git Update golang packages to v1.23 (v7.0/forgejo) (minor) (#7081) 2025-03-04 22:15:29 +00:00
issues [v7.0/forgejo] fix: consider public issues for project boards (#7143) (#7145) 2025-03-07 00:20:25 +00:00
migrations Update golang packages to v1.23 (v7.0/forgejo) (minor) (#7081) 2025-03-04 22:15:29 +00:00
organization enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
packages enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
perm enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
project Update golang packages to v1.23 (v7.0/forgejo) (minor) (#7081) 2025-03-04 22:15:29 +00:00
pull [GITEA] GetScheduledMergeByPullID may involve a system user 2024-02-05 16:09:41 +01:00
repo Update golang packages to v1.23 (v7.0/forgejo) (minor) (#7081) 2025-03-04 22:15:29 +00:00
secret Make runs-on support variable expression (#29468) 2024-03-11 23:36:59 +07:00
shared/types Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
system enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
unit enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
unittest [v7.0/forgejo] chore: replace github.com/go-testfixtures/testfixtures (#7730) 2025-04-30 14:48:56 +00:00
user Update golang packages to v1.23 (v7.0/forgejo) (minor) (#7081) 2025-03-04 22:15:29 +00:00
webhook enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
error.go Add merge style fast-forward-only (#28954) 2024-02-14 17:19:19 +01:00
fixture_generation.go Replace more db.DefaultContext (#27628) 2023-10-15 17:46:06 +02:00
fixture_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
main_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
org.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
org_team.go Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods (#28220) 2023-12-07 15:27:36 +08:00
org_team_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
org_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
repo.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
repo_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
repo_transfer.go [MODERATION] User blocking 2024-02-05 15:56:45 +01:00
repo_transfer_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00