forgejo/models/repo
Earl Warren 1075ff74b5
Use restricted sanitizer for repository description (#28141)
- Currently the repository description uses the same sanitizer as a
normal markdown document. This means that element such as heading and
images are allowed and can be abused.
- Create a minimal restricted sanitizer for the repository description,
which only allows what the postprocessor currently allows, which are
links and emojis.
- Added unit testing.
- Resolves https://codeberg.org/forgejo/forgejo/issues/1202
- Resolves https://codeberg.org/Codeberg/Community/issues/1122

(cherry picked from commit 631c87cc23)

Co-authored-by: Gusted <postmaster@gusted.xyz>
2023-11-23 16:34:25 +00:00
..
archiver.go
attachment.go
attachment_test.go
avatar.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
collaboration.go
collaboration_test.go
fork.go
fork_test.go
git.go
issue.go
language_stats.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
main_test.go
mirror.go
pushmirror.go
pushmirror_test.go
redirect.go Final round of db.DefaultContext refactor (#27587) 2023-10-14 08:37:24 +00:00
redirect_test.go Final round of db.DefaultContext refactor (#27587) 2023-10-14 08:37:24 +00:00
release.go
release_test.go
repo.go Use restricted sanitizer for repository description (#28141) 2023-11-23 16:34:25 +00:00
repo_indexer.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
repo_list.go Restricted users only see repos in orgs which their team was assigned to (#28025) 2023-11-14 15:23:04 +01:00
repo_list_test.go
repo_test.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
repo_unit.go
repo_unit_test.go
search.go
star.go
star_test.go
topic.go
topic_test.go
update.go
upload.go
user_repo.go
user_repo_test.go
watch.go Replace more db.DefaultContext (#27628) 2023-10-15 17:46:06 +02:00
watch_test.go Replace more db.DefaultContext (#27628) 2023-10-15 17:46:06 +02:00
wiki.go
wiki_test.go