gitea/routers
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
..
api/v1 Call MultipartForm.RemoveAll when request finishes (#19606) (#19607) 2022-05-05 16:13:59 +02:00
common Instead of using routerCtx just escape the url before routing (#18086) 2021-12-25 00:50:49 +08:00
install Call MultipartForm.RemoveAll when request finishes (#19606) (#19607) 2022-05-05 16:13:59 +02:00
private Fix the bug: deploy key with write access can not push (#19010) (#19182) 2022-03-23 13:44:41 +00: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) (#19783) 2022-05-25 19:49:59 +08:00
init.go Handle email address not exist (#19089) (#19121) 2022-03-19 11:35:23 +00:00