gitea/models
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 631c87cc2347f0036a75dcd21e24429bbca28207)

Co-authored-by: Gusted <postmaster@gusted.xyz>
2023-11-23 16:34:25 +00:00
..
actions Fix no ActionTaskOutput table waring (#28149) 2023-11-21 08:02:51 +00:00
activities
admin
asymkey
auth
avatars
db
dbfs
fixtures
git
issues
migrations
organization
packages
perm
project
pull
repo Use restricted sanitizer for repository description (#28141) 2023-11-23 16:34:25 +00:00
secret
shared/types
system
unit
unittest
user
webhook
error.go
fixture_generation.go
fixture_test.go
main_test.go
org_team_test.go
org_team.go
org_test.go
org.go
repo_test.go
repo_transfer_test.go
repo_transfer.go
repo.go