Bugzilla – Attachment 71480 Details for
Bug 18975
Wrong CSRF token when emailing cart contents
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18975: Retrieve up-to-date CGISESSID when just logged in
Bug-18975-Retrieve-up-to-date-CGISESSID-when-just-.patch (text/plain), 1.43 KB, created by
Claire Gravely
on 2018-02-12 15:04:51 UTC
(
hide
)
Description:
Bug 18975: Retrieve up-to-date CGISESSID when just logged in
Filename:
MIME Type:
Creator:
Claire Gravely
Created:
2018-02-12 15:04:51 UTC
Size:
1.43 KB
patch
obsolete
>From a8c06be303adcd5922e6c53cb827415960148d78 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 21 Dec 2017 17:15:43 -0300 >Subject: [PATCH] Bug 18975: Retrieve up-to-date CGISESSID when just logged in > >If a user is asked to login before sending a card, the wrong (old) >CGISESSID cookie is used. >We need to retrieve the one that has just been created. > >This will certainly need more work, I guess other scripts are affected >too. > >Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> >--- > opac/opac-sendbasket.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl >index 6ae9dfe..09c462c 100755 >--- a/opac/opac-sendbasket.pl >+++ b/opac/opac-sendbasket.pl >@@ -192,13 +192,14 @@ END_OF_BODY > output_html_with_http_headers $query, $cookie, $template->output; > } > else { >+ my $new_session_id = $cookie->value; > $template->param( > bib_list => $bib_list, > url => "/cgi-bin/koha/opac-sendbasket.pl", > suggestion => C4::Context->preference("suggestion"), > virtualshelves => C4::Context->preference("virtualshelves"), > csrf_token => Koha::Token->new->generate_csrf( >- { session_id => scalar $query->cookie('CGISESSID'), } ), >+ { session_id => $new_session_id, } ), > ); > output_html_with_http_headers $query, $cookie, $template->output; > } >-- >2.1.4
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 18975
:
70084
|
71480
|
71883