mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 22:25:28 +01:00
Fix lnurl for pull paymentdescription + fix authorize redirect form issue (#4630)
fixes #4627 fixes #4624
This commit is contained in:
parent
dffa6accb0
commit
0d077f6ce5
4 changed files with 5 additions and 2 deletions
|
@ -119,7 +119,7 @@ namespace BTCPayServer
|
|||
LightMoneyUnit.BTC),
|
||||
Tag = "withdrawRequest",
|
||||
Callback = new Uri(Request.GetCurrentUrl()),
|
||||
DefaultDescription = pp.GetBlob().Description ?? String.Empty,
|
||||
DefaultDescription = pp.GetBlob().Name ?? String.Empty,
|
||||
};
|
||||
if (pr is null)
|
||||
{
|
||||
|
|
|
@ -181,6 +181,7 @@ namespace BTCPayServer.Controllers
|
|||
var permissions = key.GetBlob().Permissions;
|
||||
var redirectVm = new PostRedirectViewModel()
|
||||
{
|
||||
AllowExternal = true,
|
||||
FormUrl = viewModel.RedirectUrl.AbsoluteUri,
|
||||
FormParameters =
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace BTCPayServer.Models
|
|||
public string AspAction { get; set; }
|
||||
public string AspController { get; set; }
|
||||
public string FormUrl { get; set; }
|
||||
public bool AllowExternal { get; set; }
|
||||
|
||||
public MultiValueDictionary<string, string> FormParameters { get; set; } = new MultiValueDictionary<string, string>();
|
||||
public Dictionary<string, string> RouteParameters { get; set; } = new Dictionary<string, string>();
|
||||
|
|
|
@ -38,7 +38,8 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
<form method="post" id="postform" action="@Url.EnsureLocal(Model.FormUrl, this.Context.Request)" rel="noreferrer noopener">
|
||||
var url = Model.AllowExternal ? Model.FormUrl : Url.EnsureLocal(Model.FormUrl, this.Context.Request);
|
||||
<form method="post" id="postform" action="@url" rel="noreferrer noopener">
|
||||
@Html.AntiForgeryToken()
|
||||
@foreach (var o in Model.FormParameters)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue