]> source.dussan.org Git - gitea.git/commit
Unify two factor check (#27915) (#27929)
authorGiteabot <teabot@gitea.io>
Mon, 6 Nov 2023 18:07:22 +0000 (02:07 +0800)
committerGitHub <noreply@github.com>
Mon, 6 Nov 2023 18:07:22 +0000 (18:07 +0000)
commita8e505a44bcc0b15dfb18c57309e1616ad741633
tree2fb3bee5c9f862280fda796a8361c97399407e18
parente47b31c691c64581b9f3644f6fc32338ef67f8b3
Unify two factor check (#27915) (#27929)

Backport #27915 by @KN4CK3R

Fixes #27819

We have support for two factor logins with the normal web login and with
basic auth. For basic auth the two factor check was implemented at three
different places and you need to know that this check is necessary. This
PR moves the check into the basic auth itself.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
modules/context/api.go
routers/api/v1/api.go
services/auth/basic.go
tests/integration/api_twofa_test.go [new file with mode: 0644]