Skip to content

Commit

Permalink
Fix incorrect OAuth message (#18332)
Browse files Browse the repository at this point in the history
As the title,

Fix #18327
  • Loading branch information
wxiaoguang committed Jan 19, 2022
1 parent 531b6d6 commit 6fba174
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion routers/web/auth/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ func AuthorizeOAuth(ctx *context.Context) {
ctx.Data["State"] = form.State
ctx.Data["Scope"] = form.Scope
ctx.Data["Nonce"] = form.Nonce
ctx.Data["ApplicationUserLink"] = "<a href=\"" + html.EscapeString(user.HTMLURL()) + "\">@" + html.EscapeString(user.Name) + "</a>"
ctx.Data["ApplicationUserLinkHTML"] = "<a href=\"" + html.EscapeString(user.HTMLURL()) + "\">@" + html.EscapeString(user.Name) + "</a>"
ctx.Data["ApplicationRedirectDomainHTML"] = "<strong>" + html.EscapeString(form.RedirectURI) + "</strong>"
// TODO document SESSION <=> FORM
err = ctx.Session.Set("client_id", app.ClientID)
Expand Down
4 changes: 2 additions & 2 deletions templates/user/auth/grant.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
{{template "base/alert" .}}
<p>
<b>{{.i18n.Tr "auth.authorize_application_description"}}</b><br/>
{{.i18n.Tr "auth.authorize_application_created_by" (.ApplicationUserLink|Escape) | Str2html}}
{{.i18n.Tr "auth.authorize_application_created_by" .ApplicationUserLinkHTML | Str2html}}
</p>
</div>
<div class="ui attached segment">
<p>{{.i18n.Tr "auth.authorize_redirect_notice" (.ApplicationRedirectDomainHTML|Escape) | Str2html}}</p>
<p>{{.i18n.Tr "auth.authorize_redirect_notice" .ApplicationRedirectDomainHTML | Str2html}}</p>
</div>
<div class="ui attached segment">
<form method="post" action="{{AppSubUrl}}/login/oauth/grant">
Expand Down

0 comments on commit 6fba174

Please sign in to comment.