1
1
mirror of https://github.com/go-gitea/gitea synced 2024-06-02 01:15:48 +00:00
gitea/routers/web/user/setting
zeripath 468387e9ce
Prevent NPE when cache service is disabled (#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.

There are also several bug fixes in the /nodeinfo API endpoint.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-05-21 22:29:49 +08:00
..
security Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
account_test.go Update HTTP status codes to modern codes (#18063) 2022-03-23 12:54:07 +08:00
account.go Prevent NPE when cache service is disabled (#19703) 2022-05-21 22:29:49 +08:00
adopt.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
applications.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
keys.go Use ctx instead of db.DefaultContext in some packages(routers/services/modules) (#19163) 2022-03-22 16:22:54 +01:00
main_test.go Use a struct as test options (#19393) 2022-04-14 21:58:21 +08:00
oauth2.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
profile.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00