0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-23 07:43:18 -05:00

Fix incorrect OAuth message (#18332)

As the title,

Fix #18327
This commit is contained in:
wxiaoguang 2022-01-20 03:05:06 +08:00 committed by GitHub
parent 531b6d60e1
commit 6fba174606
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -477,7 +477,7 @@ func AuthorizeOAuth(ctx *context.Context) {
ctx.Data["State"] = form.State ctx.Data["State"] = form.State
ctx.Data["Scope"] = form.Scope ctx.Data["Scope"] = form.Scope
ctx.Data["Nonce"] = form.Nonce 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>" ctx.Data["ApplicationRedirectDomainHTML"] = "<strong>" + html.EscapeString(form.RedirectURI) + "</strong>"
// TODO document SESSION <=> FORM // TODO document SESSION <=> FORM
err = ctx.Session.Set("client_id", app.ClientID) err = ctx.Session.Set("client_id", app.ClientID)

View file

@ -9,11 +9,11 @@
{{template "base/alert" .}} {{template "base/alert" .}}
<p> <p>
<b>{{.i18n.Tr "auth.authorize_application_description"}}</b><br/> <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> </p>
</div> </div>
<div class="ui attached segment"> <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>
<div class="ui attached segment"> <div class="ui attached segment">
<form method="post" action="{{AppSubUrl}}/login/oauth/grant"> <form method="post" action="{{AppSubUrl}}/login/oauth/grant">