Bugzilla – Attachment 133593 Details for
Bug 30532
guided_reports.pl has a problem
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30532: (bug 29957 follow-up) Fix '$cookie->value'
Bug-30532-bug-29957-follow-up-Fix-cookie-value.patch (text/plain), 2.33 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-04-21 16:54:17 UTC
(
hide
)
Description:
Bug 30532: (bug 29957 follow-up) Fix '$cookie->value'
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-04-21 16:54:17 UTC
Size:
2.33 KB
patch
obsolete
>From 0800e4cd9f7fb855623859c128d645281eeedbc2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 21 Apr 2022 15:05:24 +0200 >Subject: [PATCH] Bug 30532: (bug 29957 follow-up) Fix '$cookie->value' > >We got > Can't call method "value" on unblessed reference at /kohadevbox/koha/opac/opac-messaging.pl line 86 > >$cookie can be an arrayref, we should retrieve the session id using >CGI->cookie('CGISESSID') > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > opac/opac-messaging.pl | 2 +- > opac/opac-sendbasket.pl | 2 +- > reports/guided_reports.pl | 3 ++- > 3 files changed, 4 insertions(+), 3 deletions(-) > >diff --git a/opac/opac-messaging.pl b/opac/opac-messaging.pl >index 84867da0ba3..01faeb3cf40 100755 >--- a/opac/opac-messaging.pl >+++ b/opac/opac-messaging.pl >@@ -83,7 +83,7 @@ if ( C4::Context->preference("SMSSendDriver") eq 'Email' ) { > $template->param( sms_providers => $providers, sms_provider_id => $patron->sms_provider_id ); > } > >-my $new_session_id = $cookie->value; >+my $new_session_id = $query->cookie('CGISESSID'); > $template->param( > csrf_token => Koha::Token->new->generate_csrf({ > session_id => $new_session_id, >diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl >index d77a5b5b344..75ddd3dc2c8 100755 >--- a/opac/opac-sendbasket.pl >+++ b/opac/opac-sendbasket.pl >@@ -180,7 +180,7 @@ END_OF_BODY > output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 }; > } > else { >- my $new_session_id = $cookie->value; >+ my $new_session_id = $query->cookie('CGISESSID'); > $template->param( > bib_list => $bib_list, > url => "/cgi-bin/koha/opac-sendbasket.pl", >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index a05314f9087..c497dcc0a71 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -77,7 +77,8 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > flagsrequired => { reports => $flagsrequired }, > } > ); >-my $session = $cookie ? get_session($cookie->value) : undef; >+my $session_id = $input->cookie('CGISESSID'); >+my $session = $session_id ? get_session($session_id) : undef; > > my $filter; > if ( $input->param("filter_set") or $input->param('clear_filters') ) { >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30532
:
133557
|
133561
| 133593