Bugzilla – Attachment 158684 Details for
Bug 35291
File Upload vulnerability in upload-cover-image.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35291: Prevent leaks from FS
Bug-35291-Prevent-leaks-from-FS.patch (text/plain), 2.23 KB, created by
David Cook
on 2023-11-09 00:28:32 UTC
(
hide
)
Description:
Bug 35291: Prevent leaks from FS
Filename:
MIME Type:
Creator:
David Cook
Created:
2023-11-09 00:28:32 UTC
Size:
2.23 KB
patch
obsolete
>From 578382c7e9a04fe8c08270d6bcee44cfe75f7d07 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 8 Nov 2023 17:14:55 +0100 >Subject: [PATCH] Bug 35291: Prevent leaks from FS > >Signed-off-by: David Cook <dcook@prosentient.com.au> >--- > tools/upload-cover-image.pl | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > >diff --git a/tools/upload-cover-image.pl b/tools/upload-cover-image.pl >index 4bd2e57e8f..ff32d0889c 100755 >--- a/tools/upload-cover-image.pl >+++ b/tools/upload-cover-image.pl >@@ -175,9 +175,9 @@ if ($fileID) { > : ""; > > unless ( $delim eq "," || $delim eq "\t" ) { >- warn >-"Unrecognized or missing field delimeter. Please verify that you are using either a ',' or a 'tab'"; >+ warn "Unrecognized or missing field delimeter. Please verify that you are using either a ',' or a 'tab'"; > $error = 'DELERR'; >+ next; > } > else { > ( $biblionumber, $filename ) = split $delim, $line, 2; >@@ -186,9 +186,6 @@ if ($fileID) { > $filename =~ s/[\"\r\n]//g; > $filename =~ s/^\s+//; > $filename =~ s/\s+$//; >- if (C4::Context->preference("CataloguingLog")) { >- logaction('CATALOGUING', 'MODIFY', $biblionumber, "biblio cover image: $filename"); >- } > my $srcimage = GD::Image->new("$dir/$filename"); > my $biblio; > my $item; >@@ -238,6 +235,11 @@ if ($fileID) { > $error = 'OPNIMG'; > } > undef $srcimage; >+ >+ if (!$error && C4::Context->preference("CataloguingLog")) { >+ logaction('CATALOGUING', 'MODIFY', $biblionumber, "biblio cover image: $filename"); >+ } >+ > } > } > close($fh); >-- >2.30.2
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 35291
:
158664
|
158684
|
158685
|
158686
|
159151
|
159152
|
159153
|
159215
|
159216
|
159217
|
159218
|
159220
|
159221
|
159222
|
159223