diff options
author | max.bra | 2017-10-13 13:22:10 +0200 |
---|---|---|
committer | max.bra | 2017-10-13 13:22:10 +0200 |
commit | 8415bdcec77b5699d9c8de0efad951b0b051cc0a (patch) | |
tree | fbfec09af04776b0b5261577a41edcd19ff7d563 | |
parent | 5d4099f6c73240396776b2f73af27cb61f0471cb (diff) | |
download | aur-8415bdcec77b5699d9c8de0efad951b0b051cc0a.tar.gz |
issue 1598 pre 3.2 - more nginx config
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 11 | ||||
-rw-r--r-- | issue_1598.patch | 25 | ||||
-rw-r--r-- | nginx.pi-hole.conf | 7 |
4 files changed, 41 insertions, 8 deletions
@@ -1,7 +1,7 @@ pkgbase = pi-hole-server pkgdesc = The Pi-hole is an advertising-aware DNS/Web server. Arch adaptation for lan wide DNS server. pkgver = 3.1.4 - pkgrel = 5 + pkgrel = 6 url = https://github.com/pi-hole/pi-hole install = pi-hole-server.install arch = any @@ -33,12 +33,13 @@ pkgbase = pi-hole-server source = pi-hole-logtruncate.timer source = mimic_setupVars.conf.sh source = version.patch + source = issue_1598.patch md5sums = e231722332116b7ffab316d5c66a828e md5sums = 2c0bf61ec96bdb85edeb9fd2cc2f330b md5sums = 3f1aeea43af0b192edb36b9e5484ff87 md5sums = 7ac346581ada71187b7fd18f164bbee9 md5sums = fec45782a36ea18c25743cbeeb4ef340 - md5sums = 8d72c1c97b063cb9fed8deb91234fac3 + md5sums = 70675dcc056ee056d31c566f5237c8d2 md5sums = 990b8abd0bfbba23a7ce82c59f2e3d64 md5sums = 047f13d4ac97877f724f87b002aaee63 md5sums = d42a864f88299998f8233c0bc0dd093d @@ -46,6 +47,7 @@ pkgbase = pi-hole-server md5sums = 291d3c95e445fe65caf40c3605efd186 md5sums = e364945acb83d6bec021a40a8642aca6 md5sums = 93fe5e50cf3fcb08b24cf29b0cace85b + md5sums = d99fea037caefd6c7ab21a963d49afc6 pkgname = pi-hole-server @@ -4,7 +4,7 @@ pkgname=pi-hole-server _pkgname=pi-hole pkgver=3.1.4 -pkgrel=5 +pkgrel=6 _wwwpkgname=AdminLTE _wwwpkgver=3.1 pkgdesc='The Pi-hole is an advertising-aware DNS/Web server. Arch adaptation for lan wide DNS server.' @@ -35,21 +35,23 @@ source=(pihole-$pkgver.tar.gz::https://github.com/$_pkgname/$_pkgname/archive/v$ $_pkgname-logtruncate.service $_pkgname-logtruncate.timer mimic_setupVars.conf.sh - version.patch) + version.patch + issue_1598.patch) md5sums=('e231722332116b7ffab316d5c66a828e' '2c0bf61ec96bdb85edeb9fd2cc2f330b' '3f1aeea43af0b192edb36b9e5484ff87' '7ac346581ada71187b7fd18f164bbee9' 'fec45782a36ea18c25743cbeeb4ef340' - '8d72c1c97b063cb9fed8deb91234fac3' + '70675dcc056ee056d31c566f5237c8d2' '990b8abd0bfbba23a7ce82c59f2e3d64' '047f13d4ac97877f724f87b002aaee63' 'd42a864f88299998f8233c0bc0dd093d' '94d5aa0e8aa3d4170bcea71078a9da25' '291d3c95e445fe65caf40c3605efd186' 'e364945acb83d6bec021a40a8642aca6' - '93fe5e50cf3fcb08b24cf29b0cace85b') + '93fe5e50cf3fcb08b24cf29b0cace85b' + 'd99fea037caefd6c7ab21a963d49afc6') prepare() { _ssc="/tmp/sedcontrol" @@ -224,6 +226,7 @@ prepare() { cd "$srcdir"/"$_pkgname"-"$pkgver" patch -p1 -i "$srcdir"/version.patch + patch -p1 -i "$srcdir"/issue_1598.patch # issue 1598 -> https://github.com/pi-hole/pi-hole/issues/1598 cd "$srcdir" sed -n "/{{corever}}/w $_ssc" "$srcdir"/$_pkgname-$pkgver/advanced/Scripts/version.sh diff --git a/issue_1598.patch b/issue_1598.patch new file mode 100644 index 000000000000..aefaaf06f7d4 --- /dev/null +++ b/issue_1598.patch @@ -0,0 +1,25 @@ +From 9934f505a5c717d39167f705a818b25e8cdfda5a Mon Sep 17 00:00:00 2001 +From: Molikuner <molikuner@gmail.com> +Date: Thu, 13 Jul 2017 23:18:40 +0200 +Subject: [PATCH] Fix URL extension parsing + +when there is a querystring Pi-hole sometimes parsed a wrong extension +--- + advanced/index.php | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/advanced/index.php b/advanced/index.php +index 1dd5acc77..2facd144b 100644 +--- a/advanced/index.php ++++ b/advanced/index.php +@@ -21,8 +21,9 @@ function validIP($address){ + } + + // Retrieve server URI extension (EG: jpg, exe, php) ++// strtok($uri, '\?') splits the querystring from the path (if there is a querystring) + ini_set('pcre.recursion_limit',100); +-$uriExt = pathinfo($uri, PATHINFO_EXTENSION); ++$uriExt = pathinfo(strtok($uri,'\?'), PATHINFO_EXTENSION); + + // Define which URL extensions get rendered as "Website Blocked" + $webExt = array('asp', 'htm', 'html', 'php', 'rss', 'xml');
\ No newline at end of file diff --git a/nginx.pi-hole.conf b/nginx.pi-hole.conf index a24e38381d7d..494c32c5ee71 100644 --- a/nginx.pi-hole.conf +++ b/nginx.pi-hole.conf @@ -19,11 +19,12 @@ server { } location ~ \.php$ { + include fastcgi.conf; + fastcgi_param HTTP_HOST localhost; fastcgi_param HTTP_ORIGIN localhost; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; - include fastcgi.conf; } } @@ -54,11 +55,13 @@ server { } location ~ \.php$ { + include fastcgi.conf; + fastcgi_intercept_errors on; fastcgi_param HTTP_HOST localhost; fastcgi_param HTTP_ORIGIN localhost; + fastcgi_param SERVER_NAME $host; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; - include fastcgi.conf; } } |