gitea/routers
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
..
api Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
common Set the LastModified header for raw files (#18356) 2022-05-09 17:54:51 +02:00
install Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
private Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
utils A better go code formatter, and now make fmt can run in Windows (#17684) 2021-11-17 20:34:35 +08:00
web Prevent NPE when cache service is disabled (#19703) 2022-05-21 22:29:49 +08:00
init.go Update go tool dependencies (#19676) 2022-05-10 23:55:54 +02:00