]> git.koha-community.org Git - koha.git/commit
Bug 24719: Remove use of CGI object in C4::Context::set_remote_address()
authorDavid Cook <dcook@prosentient.com.au>
Thu, 27 Feb 2020 00:28:48 +0000 (00:28 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 6 Mar 2020 09:53:08 +0000 (09:53 +0000)
commit0fcbec7507a4117a7389d8bcebffed57db3a477c
tree376318419bc7ce488984e014fb2c5f2f6eddc7fd
parent8b003f4b73a4e1ff8c21e2e6ac6f75b3abe3ba04
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"

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
C4/Context.pm