Bug 26760: Escape URI parameters in redirect URI to paycollect.pl
Also remove useless '%.2f' formatting of amount and amountoutstanding Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
5b40df23e3
commit
cb61aec240
1 changed files with 10 additions and 7 deletions
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
use Modern::Perl;
|
use Modern::Perl;
|
||||||
use Try::Tiny;
|
use Try::Tiny;
|
||||||
|
use URI::Escape;
|
||||||
|
|
||||||
use C4::Auth;
|
use C4::Auth;
|
||||||
use C4::Output;
|
use C4::Output;
|
||||||
|
@ -172,13 +173,15 @@ if ($add) {
|
||||||
if ( $add eq 'save and pay' ) {
|
if ( $add eq 'save and pay' ) {
|
||||||
my $url = sprintf(
|
my $url = sprintf(
|
||||||
'/cgi-bin/koha/members/paycollect.pl?borrowernumber=%s&pay_individual=1&debit_type_code=%s&amount=%s&amountoutstanding=%s&description=%s&itemnumber=%s&accountlines_id=%s',
|
'/cgi-bin/koha/members/paycollect.pl?borrowernumber=%s&pay_individual=1&debit_type_code=%s&amount=%s&amountoutstanding=%s&description=%s&itemnumber=%s&accountlines_id=%s',
|
||||||
$borrowernumber,
|
map { uri_escape_utf8($_) } (
|
||||||
$line->debit_type_code,
|
$borrowernumber,
|
||||||
sprintf('%.2f', $line->amount),
|
$line->debit_type_code,
|
||||||
sprintf('%.2f', $line->amountoutstanding),
|
$line->amount,
|
||||||
$line->description,
|
$line->amountoutstanding,
|
||||||
$line->itemnumber,
|
$line->description,
|
||||||
$line->id
|
$line->itemnumber,
|
||||||
|
$line->id
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
print $input->redirect($url);
|
print $input->redirect($url);
|
||||||
|
|
Loading…
Reference in a new issue