0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-25 10:34:51 +01:00
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
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
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
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
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