common: include from cwd to work around perl v5.26 security
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 16 Jul 2017 15:44:58 +0000 (17:44 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 5 Mar 2018 22:51:17 +0000 (23:51 +0100)
Find site modules in the working directory as was default up to perl v5.24.
Sufficiently safe as all code should be executed from the document root.

common.inc.plp

index 3c92817226d8472631e81e277380c8c1b50fa4b3..68ada33956a5a1dce7116da4d6181323ab8d4e88 100644 (file)
@@ -34,6 +34,8 @@ BEGIN {
                Alert("<strong>Fatal error</strong>: $html.");
        };
 
                Alert("<strong>Fatal error</strong>: $html.");
        };
 
+       push @INC, '.';
+
        # user request
        our $Dev = $ENV{HTTP_HOST} =~ /\bdev\./;
        our ($file) = $ENV{SCRIPT_FILENAME} =~ m{ ([^/]+) \.plp$ }x;
        # user request
        our $Dev = $ENV{HTTP_HOST} =~ /\bdev\./;
        our ($file) = $ENV{SCRIPT_FILENAME} =~ m{ ([^/]+) \.plp$ }x;