Bugzilla – Attachment 69658 Details for
Bug 19319
Reflected XSS Vulnerability in opac-MARCdetail.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19319: Only fetch the record if it exists
Bug-19319-Only-fetch-the-record-if-it-exists.patch (text/plain), 2.10 KB, created by
Jonathan Druart
on 2017-12-08 18:03:59 UTC
(
hide
)
Description:
Bug 19319: Only fetch the record if it exists
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-12-08 18:03:59 UTC
Size:
2.10 KB
patch
obsolete
>From 788d428c37663c2959be96541e02b4ac9174928e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 8 Dec 2017 14:57:15 -0300 >Subject: [PATCH] Bug 19319: Only fetch the record if it exists > >We already know if the bibliographic record exists (404 redirect), >we can avoid unecessary fetches > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > opac/opac-ISBDdetail.pl | 5 +++-- > opac/opac-detail.pl | 3 ++- > 2 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl >index 7898e80609..7af74104f3 100755 >--- a/opac/opac-ISBDdetail.pl >+++ b/opac/opac-ISBDdetail.pl >@@ -71,8 +71,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > my $biblionumber = $query->param('biblionumber'); > $biblionumber = int($biblionumber); > >-my $biblio = Koha::Biblios->find( $biblionumber ); >- > # get biblionumbers stored in the cart > if(my $cart_list = $query->cookie("bib_list")){ > my @cart_list = split(/\//, $cart_list); >@@ -102,6 +100,9 @@ if ( ! $record ) { > print $query->redirect("/cgi-bin/koha/errors/404.pl"); > exit; > } >+ >+my $biblio = Koha::Biblios->find( $biblionumber ); >+ > my $framework = GetFrameworkCode( $biblionumber ); > my $record_processor = Koha::RecordProcessor->new({ > filters => 'ViewPolicy', >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 29f371e152..2e4afdd0a4 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -78,7 +78,6 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > > my $biblionumber = $query->param('biblionumber') || $query->param('bib') || 0; > $biblionumber = int($biblionumber); >-my $biblio = Koha::Biblios->find( $biblionumber ); > > my @all_items = GetItemsInfo($biblionumber); > my @hiddenitems; >@@ -96,6 +95,8 @@ if ( ! $record ) { > print $query->redirect("/cgi-bin/koha/errors/404.pl"); # escape early > exit; > } >+ >+my $biblio = Koha::Biblios->find( $biblionumber ); > my $framework = &GetFrameworkCode( $biblionumber ); > my $record_processor = Koha::RecordProcessor->new({ > filters => 'ViewPolicy', >-- >2.11.0
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 19319
:
67140
|
68482
|
68486
|
69513
|
69634
|
69635
|
69656
|
69657
| 69658