Bugzilla – Attachment 69340 Details for
Bug 12497
Make OPAC search history feature accessible when it should
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12497: Fix OPAC search history reachable by URL even when disabled
Bug-12497-Fix-OPAC-search-history-reachable-by-URL.patch (text/plain), 1.36 KB, created by
David Bourgault
on 2017-11-24 20:27:00 UTC
(
hide
)
Description:
Bug 12497: Fix OPAC search history reachable by URL even when disabled
Filename:
MIME Type:
Creator:
David Bourgault
Created:
2017-11-24 20:27:00 UTC
Size:
1.36 KB
patch
obsolete
>From efefad013baf2ecec9dc6bfe9b9f758054efdd7f Mon Sep 17 00:00:00 2001 >From: Victor Grousset <victor.grousset@biblibre.com> >Date: Fri, 24 Nov 2017 12:02:47 +0100 >Subject: [PATCH] Bug 12497: Fix OPAC search history reachable by URL even when > disabled > >Test plan: >1. Set EnableOpacSearchHistory syspref to "Keep" >2. Make a search in the OPAC >3. Go to /cgi-bin/koha/opac-search-history.pl >4. Set the EnableOpacSearchHistory syspref to "Don't keep" >5. Refresh the OPAC page to show that history is still accessible >6. Apply the patch >7. Refresh the OPAC page, you should end on the 404 page >8. Set EnableOpacSearchHistory syspref to "Keep" >9. Go to /cgi-bin/koha/opac-search-history.pl which should be reachable > >Signed-off-by: David Bourgault <david.bourgault@inlibro.com> >--- > opac/opac-search-history.pl | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/opac/opac-search-history.pl b/opac/opac-search-history.pl >index 2ee2b40..3ae4aad 100755 >--- a/opac/opac-search-history.pl >+++ b/opac/opac-search-history.pl >@@ -45,6 +45,11 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user( > } > ); > >+unless ( C4::Context->preference("EnableOpacSearchHistory") ) { >+ print $cgi->redirect("/cgi-bin/koha/errors/404.pl"); # escape early >+ exit; >+} >+ > my $type = $cgi->param('type'); > my $action = $cgi->param('action') || q{}; > my $previous = $cgi->param('previous'); >-- >2.7.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 12497
:
69313
|
69334
|
69339
|
69340
|
69341
|
69342
|
69380
|
69381