forgejo/routers/repo
zeripath f82b1dd7c3
Prevent adding nil label to .AddedLabels or .RemovedLabels (#14623)
* Prevent adding nil label to .AddedLabels or .RemovedLabels

There are possibly a few old databases out there with malmigrated data that can
cause panics with empty labels being migrated.

This PR adds a few tests to prevent nil labels being added.

Fix #14466

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

* Add doctor command to remove the broken label comments

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

Co-authored-by: 6543 <6543@obermui.de>
2021-02-10 10:50:44 +08:00
..
activity.go
attachment.go Add Content-Length header to HEAD requests (#14542) 2021-02-05 21:10:40 +01:00
blame.go Show dropdown with all statuses for commit (#13977) 2020-12-20 11:13:12 +08:00
branch.go [API] Add pagination to ListBranches (#14524) 2021-02-03 20:06:13 +01:00
commit.go Show dropdown with all statuses for commit (#13977) 2020-12-20 11:13:12 +08:00
compare.go [API] Add pagination to ListBranches (#14524) 2021-02-03 20:06:13 +01:00
download.go Add Content-Length header to HEAD requests (#14542) 2021-02-05 21:10:40 +01:00
editor.go enhancement: add signoff option in commit form (#14516) 2021-01-29 16:57:45 +08:00
editor_test.go
http.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
issue.go Prevent adding nil label to .AddedLabels or .RemovedLabels (#14623) 2021-02-10 10:50:44 +08:00
issue_dependency.go
issue_label.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
issue_label_test.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
issue_lock.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
issue_stopwatch.go Display current stopwatch in navbar (#14122) 2021-01-21 15:51:52 +01:00
issue_test.go Refactor combine label comments with tests (#13619) 2020-11-20 17:29:09 -05:00
issue_timetrack.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
issue_watch.go
lfs.go Display SVG files as images instead of text (#14101) 2021-01-12 22:45:19 -05:00
main_test.go
middlewares.go
migrate.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
milestone.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
projects.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
projects_test.go KanBan: be able to set default board (#14147) 2021-01-15 22:29:32 +02:00
pull.go Move middlewares to web/middleware (#14480) 2021-01-30 10:55:53 +02:00
pull_review.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
release.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
release_test.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
repo.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
search.go [Feature] add precise search type for Elastic Search (#12869) 2021-01-27 12:00:35 +02:00
setting.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
setting_protected_branch.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
settings_test.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
topic.go
view.go Ensure memcache TTL cannot be over 30 days (#14592) 2021-02-09 22:29:03 +00:00
webhook.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
wiki.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
wiki_test.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00