[koha-commits] main Koha release repository branch master updated. v19.05.00-1167-ga6838a3

Git repo owner gitmaster at git.koha-community.org
Thu Oct 31 17:33:35 CET 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".

The branch, master has been updated
       via  a6838a3e355797be3b100842b8b2dbde96224d24 (commit)
      from  905993658372e664aa26ddc09da40c228622cc6a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a6838a3e355797be3b100842b8b2dbde96224d24
Author: Kyle M Hall <kyle at bywatersolutions.com>
Date:   Thu Jun 6 15:35:10 2019 -0400

    Bug 23068: Add ability for Koha to handle X-Forwarded-For headers so REMOTE_ADDR features work behind a proxy
    
    Koha has a number of features that rely on knowing the IP address of the connecting client. If that server is behind a proxy these features do not work.
    This patch adds a module to automatically convert the X-Forwarded-For header into the REMOTE_ADDR environment variable for both CGI and Plack processes.
    
    TEST PLAN:
    1) Apply this patch set
    2) Install Plack::Middleware::RealIP via cpanm or your favorite utility
    3) Update your plack.psgi with the changes you find in this patch set ( this process differs based on your testing environment )
    4) Restart plack
    5) Tail the plack error log for your instance
    6) Use curl to access the OPAC, adding an X-Forwarded-For header: curl --header "X-Forwarded-For: 32.32.32.32" http://127.0.0.1:8080
    7) Note the logs output this address if you are unproxied
    8) If you are proxied, restart plack using a command like below, where the ip you see in the logs ("REAL IP) is what you put in the koha conf:
        <koha_trusted_proxies>172.22.0.1 1.1.1.1</koha_trusted_proxies>
    9) Restart all the things!
    10) Repeat step 6
    11) You should now see "REAL IP: 32.32.32.32" in the plack logs as the remote address in your plack-error.log logs!
    12) Disable plack so you are running in cgi mode, repeat step 6 again
    13) You should see "REAL IP: 32.32.32.32" as the remove address in your opac-error.log logs!
    
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
    Signed-off-by: Ed Veal <eveal at mckinneytexas.org>
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

-----------------------------------------------------------------------

Summary of changes:
 C4/Auth.pm                             |    2 +
 C4/Context.pm                          |   20 ++++++
 C4/Installer/PerlDependencies.pm       |    5 ++
 Koha/Middleware/RealIP.pm              |  120 ++++++++++++++++++++++++++++++++
 debian/templates/koha-conf-site.xml.in |    5 ++
 debian/templates/plack.psgi            |    2 +
 etc/koha-conf.xml                      |    5 ++
 7 files changed, 159 insertions(+)
 create mode 100644 Koha/Middleware/RealIP.pm


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list