gitea/modules/context
zeripath e32ab429ff
Prevent NPE on update mirror settings (#19864)
A `repo_model.Mirror` repository field (`.Repo`) will not automatically
be set, but is used without checking in mirror_pull.go:UpdateAddress.
This will cause an NPE.

This PR changes UpdateAddress to use the helper function GetRepository()
helping prevent future NPEs but also changes modules/context/repo.go to
ensure that the Mirror.Repo is set.

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2022-06-02 12:56:32 -04:00
..
access_log.go
api.go Call MultipartForm.RemoveAll when request finishes (#19606) 2022-05-05 16:13:23 +02:00
api_org.go Move organization related structs into sub package (#18518) 2022-03-29 14:29:02 +08:00
api_test.go
auth.go Refactor CSRF protection modules, make sure CSRF tokens can be up-to-date. (#19337) 2022-04-08 13:21:05 +08:00
captcha.go
context.go Call MultipartForm.RemoveAll when request finishes (#19606) 2022-05-05 16:13:23 +02:00
csrf.go Refactor CSRF protection modules, make sure CSRF tokens can be up-to-date. (#19337) 2022-04-08 13:21:05 +08:00
form.go Add config options to hide issue events (#17414) 2022-01-21 18:59:26 +01:00
org.go Only show accessible teams in dashboard dropdown list (#19642) 2022-05-07 17:49:43 +02:00
package.go Fix org package owner permissions (#19742) 2022-05-19 17:56:45 +02:00
pagination.go Remove legacy unmaintained packages, refactor to support change default locale (#19308) 2022-04-03 17:46:48 +08:00
permission.go Move access and repo permission to models/perm/access (#19350) 2022-05-11 12:09:36 +02:00
private.go Call MultipartForm.RemoveAll when request finishes (#19606) 2022-05-05 16:13:23 +02:00
repo.go Prevent NPE on update mirror settings (#19864) 2022-06-02 12:56:32 -04:00
response.go
utils.go Never use /api/v1 from Gitea UI Pages (#19318) 2022-04-07 20:59:56 +02:00
xsrf.go Refactor CSRF protection modules, make sure CSRF tokens can be up-to-date. (#19337) 2022-04-08 13:21:05 +08:00
xsrf_test.go Refactor CSRF protection modules, make sure CSRF tokens can be up-to-date. (#19337) 2022-04-08 13:21:05 +08:00