Bugzilla – Attachment 130598 Details for
Bug 29915
Anonymous session generates 1 new session ID per hit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29915: Tiny session adjustments
Bug-29915-Tiny-session-adjustments.patch (text/plain), 2.67 KB, created by
Jonathan Druart
on 2022-02-15 09:15:40 UTC
(
hide
)
Description:
Bug 29915: Tiny session adjustments
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-02-15 09:15:40 UTC
Size:
2.67 KB
patch
obsolete
>From 85f0498c0d69d7d7cd7504054a342ef71753aa12 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 25 Jan 2022 13:55:00 +0000 >Subject: [PATCH] Bug 29915: Tiny session adjustments > >It may be that we need a few additional flushes. >And checking the returned session before clearing busc. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Auth.pm | 11 +++++++---- > C4/Search/History.pm | 1 + > 2 files changed, 8 insertions(+), 4 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index d46288b1c11..2d2cf5141ea 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -561,9 +561,10 @@ sub get_template_and_user { > unless ( $pagename =~ /^(?:MARC|ISBD)?detail$/ > or $pagename =~ /^showmarc$/ > or $pagename =~ /^addbybiblionumber$/ >- or $pagename =~ /^review$/ ) { >- my $sessionSearch = get_session( $sessionID || $in->{'query'}->cookie("CGISESSID") ); >- $sessionSearch->clear( ["busc"] ) if ( $sessionSearch->param("busc") ); >+ or $pagename =~ /^review$/ ) >+ { >+ my $sessionSearch = get_session( $sessionID ); >+ $sessionSearch->clear( ["busc"] ) if $sessionSearch; > } > } > >@@ -904,6 +905,7 @@ sub checkauth { > $session->delete(); > $session->flush; > C4::Context::_unset_userenv($sessionID); >+ $sessionID = undef; > } > elsif ($logout) { > >@@ -914,6 +916,7 @@ sub checkauth { > $session->flush; > $cookies = clear_all_cookies($query); > C4::Context::_unset_userenv($sessionID); >+ $sessionID = undef; > > if ($cas and $caslogout) { > logout_cas($query, $type); >@@ -951,7 +954,6 @@ sub checkauth { > } > > unless ( $loggedin ) { >- $sessionID = undef; > $userid = undef; > } > >@@ -1249,6 +1251,7 @@ sub checkauth { > $session->param( 'sessiontype', 'anon' ); > $session->param( 'interface', $type); > } >+ $session->flush; > } # END unless ($userid) > > # finished authentification, now respond >diff --git a/C4/Search/History.pm b/C4/Search/History.pm >index df36cb0fbc7..fec4f004fd6 100644 >--- a/C4/Search/History.pm >+++ b/C4/Search/History.pm >@@ -218,6 +218,7 @@ sub set_to_session { > return () unless $session; > $session->param( 'search_history', > uri_escape( encode_json($search_history) ) ); >+ $session->flush; > } > > 1; >-- >2.25.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 29915
:
129644
|
129653
|
129683
|
129748
|
129750
|
129751
|
129752
|
129753
|
129754
|
129755
|
129756
|
129822
|
129826
|
129827
|
129828
|
129829
|
129830
|
129831
|
129832
|
129833
|
129860
|
129861
|
129862
|
129863
|
129864
|
129865
|
129866
|
129878
|
129879
|
129880
|
129882
|
129883
|
129884
|
129885
|
129886
|
129887
|
129888
|
129889
|
129906
|
129907
|
129908
|
129909
|
129910
|
129911
|
129912
|
129913
|
129951
|
130596
|
130597
|
130598
|
130599
|
130600
|
130601
|
130602
|
130603
|
130604
|
131708
|
131709
|
131710
|
131711
|
131712
|
131713
|
131714
|
131715
|
131716
|
131788
|
131789
|
131790
|
131791
|
131792
|
131793
|
131794
|
131795
|
131796
|
131797
|
132101
|
132104
|
132114
|
132158
|
132159