0
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-02-19 18:20:37 +01:00
forgejo/modules
zeripath e32ab429ff
Prevent NPE on update mirror settings ()
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
..
activitypub
analyze Simplify IsVendor () 2022-05-06 10:12:30 +01:00
appstate Use a struct as test options () 2022-04-14 21:58:21 +08:00
auth Remove legacy +build: constraint () 2022-05-02 23:22:45 +08:00
avatar Remove legacy +build: constraint () 2022-05-02 23:22:45 +08:00
base
cache Update go-chi/cache to utilize Ping() () 2022-05-15 20:43:27 +02:00
charset Detect truncated utf-8 characters at the end of content as still representing utf-8 () 2022-05-21 14:06:24 +01:00
container Move reaction to models/issues/ () 2022-03-31 17:20:39 +08:00
context Prevent NPE on update mirror settings () 2022-06-02 12:56:32 -04:00
convert Nuke the incorrect permission report on /api/v1/notifications () 2022-05-20 18:57:49 +02:00
csv
doctor Fix inconsistency in doctor output () 2022-05-31 14:49:40 -04:00
emoji
eventsource Improve Stopwatch behavior () 2022-04-25 22:45:22 +02:00
generate
git Allow custom default merge message with .gitea/default_merge_message/<merge_style>_TEMPLATE.md () 2022-05-08 20:32:45 +08:00
gitgraph Move almost all functions' parameter db.Engine to context.Context () 2022-05-20 22:08:52 +08:00
graceful Remove legacy +build: constraint () 2022-05-02 23:22:45 +08:00
hcaptcha
highlight
hostmatcher Support hostname:port to pass host matcher's check () 2022-04-29 01:39:50 +08:00
httpcache Set the LastModified header for raw files () 2022-05-09 17:54:51 +02:00
httplib
indexer Move almost all functions' parameter db.Engine to context.Context () 2022-05-20 22:08:52 +08:00
json
lfs Remove legacy +build: constraint () 2022-05-02 23:22:45 +08:00
log Only set CanColorStdout / CanColorStderr to true if the stdout/stderr is a terminal () 2022-05-03 18:03:34 +02:00
markup Remove legacy unmaintained packages, refactor to support change default locale () 2022-04-03 17:46:48 +08:00
metrics
migration Remove legacy +build: constraint () 2022-05-02 23:22:45 +08:00
nosql
notification Move access and repo permission to models/perm/access () 2022-05-11 12:09:36 +02:00
options Remove legacy +build: constraint () 2022-05-02 23:22:45 +08:00
packages Add Helm Chart registry () 2022-04-19 12:55:35 -04:00
paginator Remove legacy unmaintained packages, refactor to support change default locale () 2022-04-03 17:46:48 +08:00
password
pprof
private
process
proxy Return nil proxy function if proxy not enabled () 2021-08-19 16:41:20 -04:00
public Remove legacy +build: constraint () 2022-05-02 23:22:45 +08:00
queue Fix 64-bit atomic operations on 32-bit machines () 2022-04-27 10:32:04 -05:00
recaptcha
references
repository Update go tool dependencies () 2022-05-10 23:55:54 +02:00
secret
session
setting Enable packages by default again (as described by docs) () 2022-05-20 02:48:42 +02:00
ssh Move almost all functions' parameter db.Engine to context.Context () 2022-05-20 22:08:52 +08:00
storage
structs Respect DefaultUserIsRestricted system default when creating new user () 2022-04-29 15:38:11 -04:00
svg Remove legacy +build: constraint () 2022-05-02 23:22:45 +08:00
sync Use queue instead of memory queue in webhook send service () 2022-04-25 20:03:01 +02:00
templates Move access and repo permission to models/perm/access () 2022-05-11 12:09:36 +02:00
test Move access and repo permission to models/perm/access () 2022-05-11 12:09:36 +02:00
timeutil Remove legacy unmaintained packages, refactor to support change default locale () 2022-04-03 17:46:48 +08:00
translation Remove legacy unmaintained packages, refactor to support change default locale () 2022-04-03 17:46:48 +08:00
typesniffer Fix raw endpoint PDF file headers () 2022-05-28 18:10:14 +03:00
updatechecker
upload Simplify parameter types () 2021-12-20 04:41:31 +00:00
uri
user
util Update go tool dependencies () 2022-05-10 23:55:54 +02:00
validation use IsLoopback () 2022-04-25 13:55:12 +08:00
web Ensure responses are context.ResponseWriters () 2022-05-31 21:27:44 +01:00