[Koha-bugs] [Bug 24719] C4::Context::set_remote_address() prevents file upload for non-Plack Koha

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Feb 27 01:31:32 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24719

--- Comment #12 from David Cook <dcook at prosentient.com.au> ---
Created attachment 99680
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99680&action=edit
[Alternate PATCH] Bug 24719: Remove use of CGI object in
C4::Context::set_remote_address()

This patch replaces the CGI "http" object method with its equivalent
class method, which doesn't require object instantiation and thus skips
global initialization and premature handling of the incoming HTTP request.

Test plan:
0. Disable Plack if it is enabled
1. Set koha_trusted_proxies in koha-conf.xml to 1.1.1.1
2. Clear Memcached
3. Try to upload MARCXML file to /cgi-bin/koha/tools/stage-marc-import.pl
4. Note that form below "Upload progress" never appears and errors show
in browser console
5. Apply the patch
6. Try to upload MARCXML file to /cgi-bin/koha/tools/stage-marc-import.pl
7. Note that form appears below "Upload progress"

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list