Koha/debian/templates
Marcel de Rooy 95dc574501
Bug 16922: Add RewriteRule to apache-shared-intranet for dev package installs
As a simple alternative to the solution in bug 9949 or just as an
additional measure, this patch adds a rewrite rule for intranet
in order to intercept potential misuse of perl scripts that could be
reached on a dev package install via the cgi-bin/koha scriptalias.

It simply rewrites them to the nonexistent "notfound", resulting in a
regular 404 error.

The rewrite rule does not harm regular installs and is just a little extra
step in securing a dev install. You should have more security measures in
place to secure your staff client.

QA Note: Although a rewrite rule may not be our first choice, this one
rule is more elegant and easier to maintain than e.g. a whole bunch of
aliases.

Note: This patch should have a regular and a dev install signoff.

Test plan:
[1] Make sure that this rewrite rule is inserted in your actual apache
    config via /etc/koha/apache-shared-intranet.conf. Restart Apache.
[2] For regular package installs:
    Try one of the URLs in step 3.
    Verify that your staff client still operates as usual. Test a few
    URLs inside some modules.
[3] For dev installs:
    Try some URLs like below.
    Expect 404 errors only, not 500s. If you do not see a 404, go back!
    /misc/stage_file.pl
    /t/db_dependent/default_search_class.pl
    /installer/data/mysql/updatedatabase.pl
    /Makefile.PL
[4] Do you see an additional directory to add to the regex? Please report.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 10:43:16 +01:00
..
apache-shared-disable.conf
apache-shared-intranet-plack.conf Bug 21267: Set X-FORWARDED-PROTO https if required 2018-08-31 12:46:58 +00:00
apache-shared-intranet.conf Bug 16922: Add RewriteRule to apache-shared-intranet for dev package installs 2020-04-27 10:43:16 +01:00
apache-shared-opac-plack.conf Bug 21267: Set X-FORWARDED-PROTO https if required 2018-08-31 12:46:58 +00:00
apache-shared-opac.conf Bug 21031: Apache Rewrite rules don't work for API when using anything but Debian package Plack configuration 2018-08-02 10:23:08 -03:00
apache-shared.conf Bug 16520: Add new Plack-SetEnv syntax to Apache configuration files 2016-10-11 12:37:16 +00:00
apache-site-https.conf.in Bug 17332: Remove memcached config from apache files 2016-09-25 13:06:36 +00:00
apache-site.conf.in Bug 17332: Remove memcached config from apache files 2016-09-25 13:06:36 +00:00
koha-common.conf
koha-conf-site.xml.in Bug 25109: Add lockdir configuration entry 2020-04-14 16:56:44 +01:00
koha-sites.conf Bug 21440: koha-create expects the file passed by $DEFAULTSQL to be in gzip format 2018-10-09 09:59:10 +00:00
log4perl-site.conf.in Bug 18227: Handle utf8 in Koha::Logger 2020-04-06 11:02:14 +01:00
marc21-retrieval-info-auth-dom.xml
marc21-retrieval-info-bib-dom.xml Bug 17871: (followup) Remove zebra::* from the packages templates 2017-02-07 17:50:42 +00:00
normarc-retrieval-info-auth-dom.xml
normarc-retrieval-info-bib-dom.xml Bug 17871: (followup) Remove zebra::* from the packages templates 2017-02-07 17:50:42 +00:00
plack.psgi Bug 23068: Add ability for Koha to handle X-Forwarded-For headers so REMOTE_ADDR features work behind a proxy 2019-10-31 16:10:17 +00:00
SIPconfig.xml Bug 17228 - Make two versions of SIPconfig.xml identical 2016-09-02 15:48:14 +00:00
unimarc-retrieval-info-auth-dom.xml
unimarc-retrieval-info-bib-dom.xml Bug 17871: (followup) Remove zebra::* from the packages templates 2017-02-07 17:50:42 +00:00
zebra-authorities-dom-site.cfg.in
zebra-biblios-dom-site.cfg.in
zebra.passwd.in