Koha/debian
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
..
docs Bug 24340: allow koha-sip --disable inst 2020-02-12 16:09:35 +00:00
scripts Bug 20116: Flush the caches 2020-04-17 09:23:21 +01:00
source
templates Bug 16922: Add RewriteRule to apache-shared-intranet for dev package installs 2020-04-27 10:43:16 +01:00
bd-to-depends
build-git-snapshot
changelog
compat
control Bug 24588: (RM follow-up) Update debian/control 2020-02-21 17:13:17 +00:00
control.in
copyright Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
koha-common.bash-completion
koha-common.config
koha-common.cron.d
koha-common.cron.daily Bug 24526: Add the confirm flag to the cronjob files 2020-02-10 10:13:35 +00:00
koha-common.cron.hourly
koha-common.cron.monthly
koha-common.default
koha-common.dirs
koha-common.docs
koha-common.init Bug 23949: Update documentation 2019-11-08 12:52:14 +00:00
koha-common.install Bug 24445: Add z3950 to makefile (bug 13937 follow-up) 2020-01-17 11:09:51 +00:00
koha-common.links
koha-common.logrotate
koha-common.postinst Bug 18227: (QA follow-up) Add fix to koha-common.postinst 2020-04-06 11:02:27 +01:00
koha-common.preinst
koha-common.README.Debian
koha-common.templates
koha-post-install-setup
koha.apache-ports
koha.config
koha.dirs
koha.install
koha.postinst
koha.postrm
koha.prerm
koha.README.Debian
list-deps Bug 19735: Move Perl deps definitions into a cpanfile 2020-02-12 16:33:02 +00:00
README.build
rules
unavailable.html
update-control

In order to build .deb packages, following debian packages need to be present
(installed): 
devscripts
pbuilder
dh-make
fakeroot

As root (or sudo) execute:
pbuilder create

Executing build-git-snapshot without any arguments will leave package and the
rest in some pbuilder dir, eg. /var/cache/pbuilder/result It is highly
recommended that --buildresult option is used.