From 33af1692233c732291b175785e94e2ee022853e4 Mon Sep 17 00:00:00 2001 From: jolheiser Date: Wed, 31 Jan 2024 21:43:52 -0600 Subject: [PATCH] [SECURITY] review(kn4ck3r): more template escapes Signed-off-by: jolheiser --- templates/repo/migrate/migrating.tmpl | 6 +++--- templates/repo/settings/options.tmpl | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/repo/migrate/migrating.tmpl b/templates/repo/migrate/migrating.tmpl index ae168c07e6..939f236b9d 100644 --- a/templates/repo/migrate/migrating.tmpl +++ b/templates/repo/migrate/migrating.tmpl @@ -21,12 +21,12 @@
-

{{ctx.Locale.Tr "repo.migrate.migrating" .CloneAddr | Safe}}

+

{{ctx.Locale.Tr "repo.migrate.migrating" (.CloneAddr | Escape) | Safe}}

{{if .CloneAddr}} -

{{ctx.Locale.Tr "repo.migrate.migrating_failed" .CloneAddr | Safe}}

+

{{ctx.Locale.Tr "repo.migrate.migrating_failed" (.CloneAddr | Escape) | Safe}}

{{else}}

{{ctx.Locale.Tr "repo.migrate.migrating_failed_no_addr" | Safe}}

{{end}} @@ -58,7 +58,7 @@
{{ctx.Locale.Tr "repo.settings.delete_notices_1" | Safe}}
- {{ctx.Locale.Tr "repo.settings.delete_notices_2" .Repository.FullName | Safe}} + {{ctx.Locale.Tr "repo.settings.delete_notices_2" (.Repository.FullName | Escape) | Safe}} {{if .Repository.NumForks}}
{{ctx.Locale.Tr "repo.settings.delete_notices_fork_1"}} {{end}} diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index b6ad3aacfa..65d4ac0a1a 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -906,7 +906,7 @@
{{ctx.Locale.Tr "repo.settings.delete_notices_1" | Safe}}
- {{ctx.Locale.Tr "repo.settings.delete_notices_2" .Repository.FullName | Safe}} + {{ctx.Locale.Tr "repo.settings.delete_notices_2" (.Repository.FullName | Escape) | Safe}} {{if .Repository.NumForks}}
{{ctx.Locale.Tr "repo.settings.delete_notices_fork_1"}} {{end}} @@ -941,7 +941,7 @@
{{ctx.Locale.Tr "repo.settings.delete_notices_1" | Safe}}
- {{ctx.Locale.Tr "repo.settings.wiki_delete_notices_1" .Repository.Name | Safe}} + {{ctx.Locale.Tr "repo.settings.wiki_delete_notices_1" (.Repository.Name | Escape) | Safe}}
{{.CsrfTokenHtml}}