From 9934f505a5c717d39167f705a818b25e8cdfda5a Mon Sep 17 00:00:00 2001 From: Molikuner Date: Thu, 13 Jul 2017 23:18:40 +0200 Subject: [PATCH 1/8] 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 f38912a0c922709a3cb5f7e256fd466dc8abaade Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Thu, 27 Jul 2017 21:33:41 +0100 Subject: [PATCH 2/8] - Correctly overwrite ${INFO} boxes with ${CROSS} etc - Notify user that branch has been changed Signed-off-by: Adam Warner --- advanced/Scripts/piholeCheckout.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/advanced/Scripts/piholeCheckout.sh b/advanced/Scripts/piholeCheckout.sh index f214d2ce..1f784cbe 100644 --- a/advanced/Scripts/piholeCheckout.sh +++ b/advanced/Scripts/piholeCheckout.sh @@ -171,7 +171,11 @@ checkout_pull_branch() { oldbranch="$(git symbolic-ref HEAD)" + str="Switching to branch: ${branch}" + echo -ne " ${INFO} $str" git checkout "${branch}" --quiet || return 1 + echo -e "${OVER} ${TICK} $str" + if [[ "$(git diff "${oldbranch}" | grep -c "^")" -gt "0" ]]; then update="true" @@ -180,7 +184,7 @@ checkout_pull_branch() { git_pull=$(git pull || return 1) if [[ "$git_pull" == *"up-to-date"* ]]; then - echo -e " ${INFO} $(git pull)" + echo -e " ${INFO} ${git_pull}" else echo -e "$git_pull\\n" fi @@ -271,7 +275,7 @@ checkout() { str="Fetching branches from ${piholeGitUrl}" echo -ne " ${INFO} $str" if ! fully_fetch_repo "${PI_HOLE_FILES_DIR}" ; then - echo -e " ${CROSS} $str" + echo -e "${OVER} ${CROSS} $str" exit 1 fi corebranches=($(get_available_branches "${PI_HOLE_FILES_DIR}")) @@ -298,7 +302,7 @@ checkout() { str="Fetching branches from ${webInterfaceGitUrl}" echo -ne " ${INFO} $str" if ! fully_fetch_repo "${webInterfaceDir}" ; then - echo -e " ${CROSS} $str" + echo -e "${OVER} ${CROSS} $str" exit 1 fi webbranches=($(get_available_branches "${webInterfaceDir}")) From d90489b31d074630fb99e30d763e5a0707eb1424 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Thu, 27 Jul 2017 22:21:25 +0100 Subject: [PATCH 3/8] Include branch we're switching from Signed-off-by: Adam Warner --- advanced/Scripts/piholeCheckout.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Scripts/piholeCheckout.sh b/advanced/Scripts/piholeCheckout.sh index 1f784cbe..9e97c69c 100644 --- a/advanced/Scripts/piholeCheckout.sh +++ b/advanced/Scripts/piholeCheckout.sh @@ -171,7 +171,7 @@ checkout_pull_branch() { oldbranch="$(git symbolic-ref HEAD)" - str="Switching to branch: ${branch}" + str="Switching to branch: '${branch}' from '${oldbranch}'" echo -ne " ${INFO} $str" git checkout "${branch}" --quiet || return 1 echo -e "${OVER} ${TICK} $str" From 57878957944999c8917be95e8845a50e94f49bec Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Fri, 28 Jul 2017 16:10:13 +0100 Subject: [PATCH 4/8] 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 5/8] 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 6/8] 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 7/8] 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 8/8] 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"