mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-21 12:55:32 +03:00
[SECURITY] Fix XSS in dismissed review
- It's possible for reviews to not be assiocated with users, when they
were migrated from another forge instance. In the migration code,
there's no sanitization check for author names, so they could contain
HTML tags and thus needs to be properely escaped.
- Pass `$reviewerName` trough `Escape`.
(cherry picked from commit fe2df46d05
)
Conflicts:
templates/repo/issue/view_content/comments.tmpl
trivial context conflict
This commit is contained in:
parent
37f03e065a
commit
4fdd0ed728
1 changed files with 1 additions and 1 deletions
|
@ -775,7 +775,7 @@
|
|||
{{else}}
|
||||
{{$reviewerName = .Review.OriginalAuthor}}
|
||||
{{end}}
|
||||
{{$.locale.Tr "repo.issues.review.dismissed" $reviewerName $createdStr | Safe}}
|
||||
<span class="dismissed-message">{{$.locale.Tr "repo.issues.review.dismissed" ($reviewerName | Escape) $createdStr | Safe}}</span>
|
||||
</span>
|
||||
</div>
|
||||
{{if .Content}}
|
||||
|
|
Loading…
Reference in a new issue