forgejo/models/repo
Gusted 4b9a473e12
[GITEA] Use restricted sanitizer for repository description
- Backport of https://codeberg.org/forgejo/forgejo/pulls/1433
  - 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 a8afa4cd18)
2023-09-13 17:17:37 +02:00
..
archiver.go Display when a repo was archived (#22664) 2023-04-26 10:46:26 -04:00
attachment.go For API attachments, use API URL (#25639) (#25814) 2023-07-10 12:56:16 +00:00
attachment_test.go
avatar.go Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
collaboration.go Always reuse transaction (#22362) 2023-01-08 09:34:58 +08:00
collaboration_test.go Add unit test for repository collaboration (#25640) (#25658) 2023-07-04 06:29:43 +00:00
fork.go
fork_test.go
git.go Avoid amending the Rebase and Fast-forward merge if there is no message template (#25779) (#25809) 2023-07-10 10:23:54 +00:00
issue.go Rename almost all Ctx functions (#22071) 2022-12-10 10:46:31 +08:00
language_stats.go
main_test.go
mirror.go Replace interface{} with any (#25686) (#25687) 2023-07-04 23:41:32 -04:00
pushmirror.go Replace interface{} with any (#25686) (#25687) 2023-07-04 23:41:32 -04:00
pushmirror_test.go Replace interface{} with any (#25686) (#25687) 2023-07-04 23:41:32 -04:00
redirect.go
redirect_test.go
release.go Replace interface{} with any (#25686) (#25687) 2023-07-04 23:41:32 -04:00
repo.go [GITEA] Use restricted sanitizer for repository description 2023-09-13 17:17:37 +02:00
repo_indexer.go
repo_list.go Replace interface{} with any (#25686) (#25687) 2023-07-04 23:41:32 -04:00
repo_list_test.go fix calReleaseNumCommitsBehind (#24148) 2023-04-18 21:11:17 +02:00
repo_test.go Set repository link based on the url in package.json for npm packages (#20379) 2023-03-28 13:55:03 -04:00
repo_unit.go Pull Requests: setting to allow edits by maintainers by default, tweak UI (#22862) 2023-02-13 14:09:52 +08:00
search.go Split "modules/context.go" to separate files (#24569) 2023-05-08 17:36:54 +08:00
star.go Remove stars when repo goes private (#19904) 2023-06-05 13:25:43 +00:00
star_test.go Remove stars when repo goes private (#19904) 2023-06-05 13:25:43 +00:00
topic.go Fix the topic validation rule and suport dots (#26286) (#26303) 2023-08-21 07:22:16 +02:00
topic_test.go Fix the topic validation rule and suport dots (#26286) (#26303) 2023-08-21 07:22:16 +02:00
update.go Fix unclear IsRepositoryExist logic (#24374) 2023-04-28 14:14:26 -04:00
upload.go
user_repo.go [MODERATION] organization blocking a user (#802) 2023-07-17 00:26:42 +02:00
user_repo_test.go [MODERATION] organization blocking a user (#802) 2023-07-17 00:26:42 +02:00
watch.go [MODERATION] organization blocking a user (#802) 2023-07-17 00:26:42 +02:00
watch_test.go [MODERATION] organization blocking a user (#802) 2023-07-17 00:26:42 +02:00
wiki.go
wiki_test.go