1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-02 08:14:25 +00:00
gitea/routers/web/user
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
..
setting Prevent NPE when cache service is disabled (#19703) 2022-05-21 22:29:49 +08:00
avatar.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
home_test.go Renamed ctx.User to ctx.Doer. (#19161) 2022-03-22 15:03:22 +08:00
home.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
main_test.go Use a struct as test options (#19393) 2022-04-14 21:58:21 +08:00
notification.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
package.go Move access and repo permission to models/perm/access (#19350) 2022-05-11 12:09:36 +02:00
profile.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
search.go Never use /api/v1 from Gitea UI Pages (#19318) 2022-04-07 20:59:56 +02:00
stop_watch.go Never use /api/v1 from Gitea UI Pages (#19318) 2022-04-07 20:59:56 +02:00
task.go Renamed ctx.User to ctx.Doer. (#19161) 2022-03-22 15:03:22 +08:00