]> 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)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 9 Apr 2020 19:44:27 +0000 (19:44 +0000)
commitd8cb07d6658850a84f125956d6f058a1fa72de74
tree3cd6a6c984c1c89dbd443abdbe43013a9b210a6e
parente5cf4065d11d850e89b614148be58f766638698d
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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 74e3ef126c5992ac049a35c75a7d3879669d7a49)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
C4/Context.pm