Skip to content

Commit 6fba174

Browse files
authored
Fix incorrect OAuth message (#18332)
As the title, Fix #18327
1 parent 531b6d6 commit 6fba174

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

routers/web/auth/oauth.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ func AuthorizeOAuth(ctx *context.Context) {
477477
ctx.Data["State"] = form.State
478478
ctx.Data["Scope"] = form.Scope
479479
ctx.Data["Nonce"] = form.Nonce
480-
ctx.Data["ApplicationUserLink"] = "<a href=\"" + html.EscapeString(user.HTMLURL()) + "\">@" + html.EscapeString(user.Name) + "</a>"
480+
ctx.Data["ApplicationUserLinkHTML"] = "<a href=\"" + html.EscapeString(user.HTMLURL()) + "\">@" + html.EscapeString(user.Name) + "</a>"
481481
ctx.Data["ApplicationRedirectDomainHTML"] = "<strong>" + html.EscapeString(form.RedirectURI) + "</strong>"
482482
// TODO document SESSION <=> FORM
483483
err = ctx.Session.Set("client_id", app.ClientID)

templates/user/auth/grant.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
{{template "base/alert" .}}
1010
<p>
1111
<b>{{.i18n.Tr "auth.authorize_application_description"}}</b><br/>
12-
{{.i18n.Tr "auth.authorize_application_created_by" (.ApplicationUserLink|Escape) | Str2html}}
12+
{{.i18n.Tr "auth.authorize_application_created_by" .ApplicationUserLinkHTML | Str2html}}
1313
</p>
1414
</div>
1515
<div class="ui attached segment">
16-
<p>{{.i18n.Tr "auth.authorize_redirect_notice" (.ApplicationRedirectDomainHTML|Escape) | Str2html}}</p>
16+
<p>{{.i18n.Tr "auth.authorize_redirect_notice" .ApplicationRedirectDomainHTML | Str2html}}</p>
1717
</div>
1818
<div class="ui attached segment">
1919
<form method="post" action="{{AppSubUrl}}/login/oauth/grant">

0 commit comments

Comments
 (0)