This repository has been archived on 2024-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
forgejo/routers/web/auth
zeripath ccc11c1e77
Prevent NPE when cache service is disabled (#19703) (#19783)
Backport #19703

The cache service can be disabled - at which point ctx.Cache will be nil
and the use of it will cause an NPE.

The main part of this PR is that the cache is used for restricting
resending of activation mails and without this we cache we cannot
restrict this. Whilst this code could be re-considered to use the db and
probably should be, I think we can simply disable this code in the case
that the cache is disabled.

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lauris BH <lauris@nix.lv>
2022-05-25 19:49:59 +08:00
..
2fa.go
auth.go Prevent NPE when cache service is disabled (#19703) (#19783) 2022-05-25 19:49:59 +08:00
linkaccount.go Respect DefaultUserIsRestricted system default when creating new user (#19310 ) (#19560) 2022-04-30 15:00:14 +02:00
main_test.go
oauth.go Respect DefaultUserIsRestricted system default when creating new user (#19310 ) (#19560) 2022-04-30 15:00:14 +02:00
oauth_test.go Support webauthn (#17957) 2022-01-14 16:03:31 +01:00
openid.go Respect DefaultUserIsRestricted system default when creating new user (#19310 ) (#19560) 2022-04-30 15:00:14 +02:00
password.go Prevent NPE when cache service is disabled (#19703) (#19783) 2022-05-25 19:49:59 +08:00
webauthn.go Webauthn nits (#18284) 2022-01-15 17:52:56 +01:00