From 9934f505a5c717d39167f705a818b25e8cdfda5a Mon Sep 17 00:00:00 2001 From: Molikuner Date: Thu, 13 Jul 2017 23:18:40 +0200 Subject: [PATCH 1/6] 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 1dd5acc7..2facd144 100644 --- a/advanced/index.php +++ b/advanced/index.php @@ -21,8 +21,9 @@ if ($serverName === 'pi.hole') } // 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'); From 57878957944999c8917be95e8845a50e94f49bec Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Fri, 28 Jul 2017 16:10:13 +0100 Subject: [PATCH 2/6] stop an extra `h` being added to leasetime of DHCP server. We already storethe `h` in `setupVars.conf` Signed-off-by: Adam Warner --- advanced/Scripts/webpage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 9d101482..a72a0709 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -264,7 +264,7 @@ ProcessDHCPSettings() { leasetime="24h" change_setting "DHCP_LEASETIME" "${leasetime}" else - leasetime="${DHCP_LEASETIME}h" + leasetime="${DHCP_LEASETIME}" fi # Write settings to file From 4fb66e632fbb35e72af2f08e37b3e6c6f6c5534b Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Fri, 28 Jul 2017 16:30:03 +0100 Subject: [PATCH 3/6] The other h --- advanced/Scripts/webpage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index a72a0709..b0d88284 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -261,10 +261,10 @@ ProcessDHCPSettings() { if [[ "${DHCP_LEASETIME}" == "0" ]]; then leasetime="infinite" elif [[ "${DHCP_LEASETIME}" == "" ]]; then - leasetime="24h" + leasetime="24" change_setting "DHCP_LEASETIME" "${leasetime}" else - leasetime="${DHCP_LEASETIME}" + leasetime="${DHCP_LEASETIME}h" fi # Write settings to file From 0a9965292cd0918477b186c1f2981979c67e1933 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Fri, 28 Jul 2017 19:40:13 +0100 Subject: [PATCH 4/6] Additional check to fix any existing cases of "24h" in setupVars.conf automatically. Signed-off-by: Adam Warner --- advanced/Scripts/webpage.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index b0d88284..560bebd0 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -263,6 +263,11 @@ ProcessDHCPSettings() { elif [[ "${DHCP_LEASETIME}" == "" ]]; then leasetime="24" change_setting "DHCP_LEASETIME" "${leasetime}" + elif [[ "${DHCP_LEASETIME}" == "24h" ]]; then + #Installation is affected by known bug, introduced in a previous version. + #This will automatically clean up setupVars.conf and remove the unnecessary "h" + leasetime="24" + change_setting "DHCP_LEASETIME" "${leasetime}" else leasetime="${DHCP_LEASETIME}h" fi From defc17ba464829a14bb901eda10ba8abedaaec11 Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Fri, 28 Jul 2017 20:24:27 -0700 Subject: [PATCH 5/6] Remove DO from README.md Preparation for futher infrastructure changes. Will remove the DO slug from README and adjust some wording. --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index 6f8813fa..832c9fcf 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,9 @@ Block ads for **all** your devices _without_ the need to install client-side sof - Internet-connected home automation - Anything that communicates with the Internet -

- -

- ## Your Support Still Matters -Digital Ocean helps with our infrastructure, but our developers are all volunteers so *your donations help keep us innovating*. Sending a donation using our links below helps us offset a portion of our monthly costs. +All our developers are all volunteers so *your donations help keep us innovating*. Sending a donation using our links below helps us offset a portion of our monthly costs. - ![Paypal](https://assets.pi-hole.net/static/paypal.png) [Donate via PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3J2L3Z4DHW9UY) - ![Bitcoin](https://assets.pi-hole.net/static/Bitcoin.png) Bitcoin Address: 1GKnevUnVaQM2pQieMyeHkpr8DXfkpfAtL From 2f36acae4969c14a9c4f8a66e0ead3de14984d5d Mon Sep 17 00:00:00 2001 From: WaLLy3K Date: Wed, 23 Aug 2017 11:51:16 +1000 Subject: [PATCH 6/6] Remove errornous space --- automated install/basic-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 4047502b..4fc94837 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1216,7 +1216,7 @@ install_dependent_packages() { if command -v debconf-apt-progress &> /dev/null; then # For each package, for i in "${argArray1[@]}"; do - echo -ne " ${INFO} Checking for $i..." + echo -ne " ${INFO} Checking for $i..." # if dpkg-query -W -f='${Status}' "${i}" 2>/dev/null | grep "ok installed" &> /dev/null; then # @@ -1243,7 +1243,7 @@ install_dependent_packages() { # Install Fedora/CentOS packages for i in "${argArray1[@]}"; do - echo -ne " ${INFO} Checking for $i..." + echo -ne " ${INFO} Checking for $i..." # if ${PKG_MANAGER} -q list installed "${i}" &> /dev/null; then echo -e "${OVER} ${TICK} Checking for $i"