From c91a7e8dbb14f3a1e9f1416c689187cbf1c2c3cf Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 15 Aug 2023 00:21:04 +0800 Subject: [PATCH] Use `object-fit: contain` for oauth2 custom icons (#26493) --- services/auth/source/oauth2/providers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/auth/source/oauth2/providers.go b/services/auth/source/oauth2/providers.go index 16620fad6..7572aa20c 100644 --- a/services/auth/source/oauth2/providers.go +++ b/services/auth/source/oauth2/providers.go @@ -56,7 +56,7 @@ func (p *AuthSourceProvider) DisplayName() string { func (p *AuthSourceProvider) IconHTML() template.HTML { if p.iconURL != "" { - img := fmt.Sprintf(`%s`, + img := fmt.Sprintf(`%s`, html.EscapeString(p.iconURL), html.EscapeString(p.DisplayName()), ) return template.HTML(img)