[Bug 20564] New: Error 500 displays when uploading patron images with a zipped file

classic Classic list List threaded Threaded
22 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] New: Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

            Bug ID: 20564
           Summary: Error 500 displays when uploading patron images with a
                    zipped file
 Change sponsored?: ---
           Product: Koha
           Version: 17.11
          Hardware: PC
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P5 - low
         Component: Tools
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]

When uploading a zipped file of patron images an Error 500 message displays on
screen at cgi-bin/koha/tools/picture-upload.pl.  The error displays regardless
of whether the upload was successful or not and means that the user does not
see the expected confirmation message.

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]-c
                   |                            |ommunity.org

--- Comment #1 from Jonathan Druart <[hidden email]> ---
Hi Lucy,
Which exact version of Koha are you using? Do you have access to the logs on
the server?

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

--- Comment #2 from Lucy Vaux-Harvey <[hidden email]> ---
Version 17.11.03 and I do have access to server logs

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

--- Comment #3 from Jonathan Druart <[hidden email]> ---
Which error related to this problem do you see in the logs?

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

sunil <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #4 from sunil <[hidden email]> ---
Similar error faced by me and some other users also in past, See:
https://lists.katipo.co.nz/public/koha/2017-July/048523.html

I think this error comes after a security update of apache web server:
https://serverfault.com/questions/853103/500-internal-server-ah02429-response-header-name

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

--- Comment #5 from Jonathan Druart <[hidden email]> ---
Lucy, which version of Apache are you using?

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

--- Comment #6 from Lucy Vaux-Harvey <[hidden email]> ---
Hi Jonathan, thanks for taking a look.  I've re-tested but can't reproduce the
error on the 17.11.03 site.

However, I do still get the error for another site where this was reported:
Version 16.11.03
Apache/2.4.10 (Debian)
Error logged as:
[Tue May 08 11:46:42.647237 2018] [http:error] [pid 21812:tid 140624423646976]
[client 2.25.8.236:60806] AH02429: Response header name '  inflating' contains
invalid characters, aborting request, referer:
https://bcol-staff.koha-ptfs.co.uk/cgi-bin/koha/tools/picture-upload.pl

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

Marjorie Barry-Vila <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marjorie.barry-vila@collect
                   |                            |o.ca

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

Eugene Espinoza <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #7 from Eugene Espinoza <[hidden email]> ---
Hi all! Getting also the same error when batch uploading patron images.
However, when I enabled plack in the server, the images were uploaded
successfully.

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

Indranil Das Gupta <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #8 from Indranil Das Gupta <[hidden email]> ---
Confirming that the problem persists on a package installed 17.11.05
(non-plack) with Apache 2.4.10.

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

--- Comment #9 from Jonathan Druart <[hidden email]> ---
Then install plack :)

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

Kyle M Hall <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #10 from Kyle M Hall <[hidden email]> ---
(In reply to Jonathan Druart from comment #9)
> Then install plack :)

The script in question does not run under plack.

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

Nick Clemens <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #11 from Nick Clemens <[hidden email]> ---
The issue seems to be the call to system():

tools/upload-cover-image.pl:
107         unless ( system( "unzip", $filename, '-d', $dirname ) == 0 ) {
108             $error = 'UZIPFAIL';
109         }

This prints the reults to STDOUT, that is where the '   inflating' that upsets
apache comes from

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

Nick Clemens <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |Needs Signoff
   Patch complexity|---                         |Trivial patch

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

--- Comment #12 from Nick Clemens <[hidden email]> ---
Created attachment 76807
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76807&action=edit
Bug 20564: Don't use system to unzip files

To test:
1 - Setup a zip file for patron images and cover images
2 - Test each tool
3 - Get a '500 error' after upload (note images do upload and attach)
4 - Apply patch
5 - Restart all the things
6 - Test agtain, uploads should complete and results display

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

Nick Clemens <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|trivial                     |normal

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
           Assignee|[hidden email]-commun |[hidden email]
                   |ity.org                     |

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

--- Comment #13 from Lucy Vaux-Harvey <[hidden email]> ---
I've tried testing this patch on one of the sandboxes but can't access the
Upload patron images tool at
http://pro.user05-koha.sandbox.biblibre.eu/cgi-bin/koha/tools/picture-upload.pl
Software error is:
Global symbol "$filename" requires explicit package name (did you forget to
declare "my $filename"?) at /home/koha/src/tools/picture-upload.pl line 118.
Execution of /home/koha/src/tools/picture-upload.pl aborted due to compilation
errors.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

M. Tompsett <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #14 from M. Tompsett <[hidden email]> ---
Useful documentation link for creating the zip file to test with:
http://manual.koha-community.org/3.2/en/uploadpatronimages.html
https://koha-community.org/manual/18.05/en/html/tools.html?highlight=batch%20patron%20upload#upload-patron-images

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

Saiful Amin <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
                   |                            |om

--- Comment #15 from Saiful Amin <[hidden email]> ---
(In reply to Nick Clemens from comment #12)

> Created attachment 76807 [details] [review]
> Bug 20564: Don't use system to unzip files
>
> To test:
> 1 - Setup a zip file for patron images and cover images
> 2 - Test each tool
> 3 - Get a '500 error' after upload (note images do upload and attach)
> 4 - Apply patch
> 5 - Restart all the things
> 6 - Test agtain, uploads should complete and results display

This is great patch, except for a typo.

It worked only after I changed this line in tools/picture-upload.pl [17.11.5]:
    qx/unzip $filename -d $dirname/;

with this:
    qx/unzip $tempfile -d $dirname/;

The patch can be modified accordingly before it can be signed off.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

Nick Clemens <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #76807|0                           |1
        is obsolete|                            |

--- Comment #16 from Nick Clemens <[hidden email]> ---
Created attachment 77725
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77725&action=edit
Bug 20564: Don't use system to unzip files

To test:
1 - Setup a zip file for patron images and cover images
2 - Test each tool
3 - Get a '500 error' after upload (note images do upload and attach)
4 - Apply patch
5 - Restart all the things
6 - Test agtain, uploads should complete and results display

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20564] Error 500 displays when uploading patron images with a zipped file

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20564

--- Comment #17 from Nick Clemens <[hidden email]> ---
(In reply to Saiful Amin from comment #15)

> This is great patch, except for a typo.
Oh, ha ha, whoops

Silly copy paste error

Patch updated, thank you

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/