Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-24 02:36:10 +01:00

[SECURITY] review(kn4ck3r): more template escapes

Signed-off-by: jolheiser <john.olheiser@gmail.com>
(cherry picked from commit 33af169223)

Conflicts:
	templates/repo/migrate/migrating.tmpl
	templates/repo/settings/options.tmpl
	trivial context conflict
This commit is contained in:
jolheiser 2024-01-31 21:43:52 -06:00 committed by Earl Warren
parent 496b0acd22
commit 09635b6b12
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 5 additions and 5 deletions

View file

@ -21,12 +21,12 @@
<div class="ui stackable middle very relaxed page grid"> <div class="ui stackable middle very relaxed page grid">
<div class="sixteen wide center aligned centered column"> <div class="sixteen wide center aligned centered column">
<div id="repo_migrating_progress"> <div id="repo_migrating_progress">
<p>{{.locale.Tr "repo.migrate.migrating" .CloneAddr | Safe}}</p> <p>{{.locale.Tr "repo.migrate.migrating" (.CloneAddr | Escape) | Safe}}</p>
<p id="repo_migrating_progress_message"></p> <p id="repo_migrating_progress_message"></p>
</div> </div>
<div id="repo_migrating_failed" class="gt-hidden"> <div id="repo_migrating_failed" class="gt-hidden">
{{if .CloneAddr}} {{if .CloneAddr}}
<p>{{.locale.Tr "repo.migrate.migrating_failed" .CloneAddr | Safe}}</p> <p>{{.locale.Tr "repo.migrate.migrating_failed" (.CloneAddr | Escape) | Safe}}</p>
{{else}} {{else}}
<p>{{.locale.Tr "repo.migrate.migrating_failed_no_addr" | Safe}}</p> <p>{{.locale.Tr "repo.migrate.migrating_failed_no_addr" | Safe}}</p>
{{end}} {{end}}
@ -57,7 +57,7 @@
<div class="content"> <div class="content">
<div class="ui warning message"> <div class="ui warning message">
{{.locale.Tr "repo.settings.delete_notices_1" | Safe}}<br> {{.locale.Tr "repo.settings.delete_notices_1" | Safe}}<br>
{{.locale.Tr "repo.settings.delete_notices_2" .Repository.FullName | Safe}} {{.locale.Tr "repo.settings.delete_notices_2" (.Repository.FullName | Escape) | Safe}}
{{if .Repository.NumForks}}<br> {{if .Repository.NumForks}}<br>
{{.locale.Tr "repo.settings.delete_notices_fork_1"}} {{.locale.Tr "repo.settings.delete_notices_fork_1"}}
{{end}} {{end}}

View file

@ -943,7 +943,7 @@
<div class="content"> <div class="content">
<div class="ui warning message"> <div class="ui warning message">
{{.locale.Tr "repo.settings.delete_notices_1" | Safe}}<br> {{.locale.Tr "repo.settings.delete_notices_1" | Safe}}<br>
{{.locale.Tr "repo.settings.delete_notices_2" .Repository.FullName | Safe}} {{.locale.Tr "repo.settings.delete_notices_2" (.Repository.FullName | Escape) | Safe}}
{{if .Repository.NumForks}}<br> {{if .Repository.NumForks}}<br>
{{.locale.Tr "repo.settings.delete_notices_fork_1"}} {{.locale.Tr "repo.settings.delete_notices_fork_1"}}
{{end}} {{end}}
@ -978,7 +978,7 @@
<div class="content"> <div class="content">
<div class="ui warning message"> <div class="ui warning message">
{{.locale.Tr "repo.settings.delete_notices_1" | Safe}}<br> {{.locale.Tr "repo.settings.delete_notices_1" | Safe}}<br>
{{.locale.Tr "repo.settings.wiki_delete_notices_1" .Repository.Name | Safe}} {{.locale.Tr "repo.settings.wiki_delete_notices_1" (.Repository.Name | Escape) | Safe}}
</div> </div>
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}