gitea/routers/web
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
..
admin Fix oauth setting list bug (#19681) 2022-05-11 21:05:58 +08:00
auth Prevent NPE when cache service is disabled (#19703) (#19783) 2022-05-25 19:49:59 +08:00
dev Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
events Refactor auth package (#17962) 2022-01-02 21:12:35 +08:00
explore Refactor admin user filter query parameters (#18965) (#18975) 2022-03-02 19:57:18 +01:00
feed GetFeeds must always discard actions with dangling repo_id (#19598) (#19629) 2022-05-08 15:05:40 +02:00
org Send 404 on `/{org}.gpg` (#18959) (#18962) 2022-03-01 20:37:47 -05:00
repo Fix new release from tags list UI (#19670) (#19673) 2022-05-10 22:55:28 +02:00
user Prevent NPE when cache service is disabled (#19703) (#19783) 2022-05-25 19:49:59 +08:00
base.go Clean paths when looking in Storage (#19124) (#19179) 2022-03-23 09:23:00 +00:00
goget.go Refactor HTTP request context (#17979) 2021-12-15 14:59:57 +08:00
home.go Refactor auth package (#17962) 2022-01-02 21:12:35 +08:00
metrics.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
nodeinfo.go Add nodeinfo endpoint for federation purposes (#16953) 2021-09-28 01:38:06 +02:00
swagger_json.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
web.go Fix middleware function's placements for `/user/...` (#19377) (#19378) 2022-04-12 11:06:07 +08:00