aboutsummaryrefslogtreecommitdiffstats
path: root/BSDmakefile
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-08-18 16:57:40 +0800
committerGitHub <noreply@github.com>2022-08-18 11:57:40 +0300
commitc40c7536139b9d076e534653fdcdd1ccdd64db65 (patch)
treeae53ade1a4d3a538cedb0725cdb6a11458b7c256 /BSDmakefile
parent7a9b01a2ddfc8f28d114b6279d6613a3079c09ce (diff)
downloadgitea-c40c7536139b9d076e534653fdcdd1ccdd64db65.tar.gz
gitea-c40c7536139b9d076e534653fdcdd1ccdd64db65.zip
Check Mirror exists before linking its Repo (#20840) (#20842)
In MirrorRepositoryList.loadAttributes there is some code to load the Mirror entries from the database. This assumes that every Repository which has IsMirror set has a Mirror associated in the DB. This association is incorrect in the case of Mirror repository under creation when there is no Mirror entry in the DB until completion. Unfortunately LoadAttributes makes this incorrect assumption and presumes that a Mirror will always be loaded. This then causes a panic. This PR simply double checks if there a Mirror before attempting to link back to its Repo. Unfortunately it should be expected that there may be other cases where this incorrect assumption causes further problems. Fix #20804 Signed-off-by: Andrew Thornton <art27@cantab.net> Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'BSDmakefile')
0 files changed, 0 insertions, 0 deletions