Bugzilla – Attachment 158664 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.18 KB, created by
Jonathan Druart
on 2023-11-08 16:15:06 UTC
(
hide
)
Description:
Bug 35291: Prevent leaks from FS
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-11-08 16:15:06 UTC
Size:
2.18 KB
patch
obsolete
>From 3deaf926407a409599b32b08cd3e69bfb5f2f6a6 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 > >--- > 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 4bd2e57e8f9..ff32d0889c3 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.34.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 35291
:
158664
|
158684
|
158685
|
158686
|
159151
|
159152
|
159153
|
159215
|
159216
|
159217
|
159218
|
159220
|
159221
|
159222
|
159223