GetFeeds must always discard actions with dangling repo_id (#19598)

* GetFeeds must always discard actions with dangling repo_id

See https://discourse.gitea.io/t/blank-page-after-login/5051/12
for a panic in 1.16.6.

* add comment to explain the dangling ID in the fixture

* loadRepoOwner must not attempt to use a nil action.Repo

* make fmt

Co-authored-by: Loïc Dachary <loic@dachary.org>
这个提交包含在:
singuliere
2022-05-05 11:39:26 -04:00
提交者 GitHub
共同撰写人 Loïc Dachary
父节点 04fc4b7e05
当前提交 b536b65189
修改 5 个文件,包含 37 行新增7 行删除
+8
查看文件
@@ -56,3 +56,11 @@
repo_id: 8 # public
is_private: false
created_unix: 1603011540 # grouped with id:7
- id: 8
user_id: 1
op_type: 12 # close issue
act_user_id: 1
repo_id: 1700 # dangling intentional
is_private: false
created_unix: 1603011541