Koha-clms/debian
Marcel de Rooy d10e44a9d7 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: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 3401e94d94)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2020-04-22 19:53:31 +00:00
..
docs Bug 19465: Document koha-create --elasticsearch-server option switch 2020-01-13 22:31:47 +00:00
scripts Bug 17532: Make koha-shell propagate the error code 2020-04-09 19:36:17 +00:00
source
…
templates Bug 16922: Add RewriteRule to apache-shared-intranet for dev package installs 2020-04-22 19:53:31 +00:00
README.build
…
bd-to-depends
…
build-git-snapshot Bug 21000: Force case sensitivity on Getopt::Long 2019-07-30 07:36:15 +02:00
changelog
…
compat Bug 18908: Warning "Compatibility levels before 9 are deprecated" 2018-03-19 13:55:47 -03:00
control Bug 17108- Automatic debian/control updates (stable/19.05.x) 2019-06-10 11:04:19 +02:00
control.in Bug 20801: Make dependency on memcached mandatory 2018-05-22 11:19:59 -03:00
copyright
…
koha-common.README.Debian
…
koha-common.bash-completion Bug 22238: Remove koha-*-sip scripts in favor of koha-sip 2019-02-11 18:30:10 +00:00
koha-common.config
…
koha-common.cron.d Bug 17717: Make cronjobs using koha-foreach use --chdir 2018-03-15 08:22:04 +00:00
koha-common.cron.daily Bug 21235: Remove table services_throttle 2018-09-07 15:09:39 +00:00
koha-common.cron.hourly Bug 17717: Make cronjobs using koha-foreach use --chdir 2018-03-15 08:22:04 +00:00
koha-common.cron.monthly Bug 17717: Make cronjobs using koha-foreach use --chdir 2018-03-15 08:22:04 +00:00
koha-common.default
…
koha-common.dirs
…
koha-common.docs Bug 21626: (QA follow-up) Embed teams.yaml for debian packages 2019-05-17 14:46:10 +00:00
koha-common.init Bug 22235: Make maintenance scripts use koha-sip instead of koha-*-sip 2019-02-11 18:30:10 +00:00
koha-common.install Bug 22238: Remove koha-*-sip scripts in favor of koha-sip 2019-02-11 18:30:10 +00:00
koha-common.links Bug 22238: Remove koha-*-sip scripts in favor of koha-sip 2019-02-11 18:30:10 +00:00
koha-common.logrotate
…
koha-common.postinst Bug 21897: Typo in postinst 2018-11-29 17:58:27 +00:00
koha-common.preinst
…
koha-common.templates
…
koha-post-install-setup
…
koha.README.Debian
…
koha.apache-ports
…
koha.config
…
koha.dirs
…
koha.install Bug 14302: Remove GRS1 specific code 2018-08-31 11:24:20 +00:00
koha.postinst
…
koha.postrm
…
koha.prerm
…
list-deps Bug 20800: Keep Koha on Stretch from using broken libhttp-oai-perl 2018-05-22 11:19:49 -03:00
rules Bug 21626: (QA follow-up) Embed teams.yaml for debian packages 2019-05-17 14:46:10 +00:00
unavailable.html
…
update-control
…

README.build

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.