Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pi-hole/pi-hole.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Schaper <dan.schaper@pi-hole.net>2021-04-15 00:10:21 +0300
committerGitHub <noreply@github.com>2021-04-15 00:10:21 +0300
commit4736e03108763cc2d5659f48d8a1e8a64d9b2608 (patch)
treed37d33ff8b0fe928d99ad4a76ad330b8786407e4
parent4c39edbeb91c04b83d4d78e4eaf669c3a8c04fc6 (diff)
parent18bedc0493b73364325c0570f7e60062cb0e61cd (diff)
Merge pull request #4122 from pi-hole/release/v5.3.1v5.3.1
HotFix release v5.3.1
-rw-r--r--advanced/index.php2
-rwxr-xr-xautomated install/basic-install.sh9
-rw-r--r--test/test_automated_install.py28
3 files changed, 19 insertions, 20 deletions
diff --git a/advanced/index.php b/advanced/index.php
index 8f33cf5d..a38cd365 100644
--- a/advanced/index.php
+++ b/advanced/index.php
@@ -78,7 +78,7 @@ if ($serverName === "pi.hole"
</head>
<body id='splashpage'>
<div id="pihole_card">
- <img src='admin/img/logo.svg' alt='Pi-hole logo id="pihole_logo_splash" />
+ <img src='admin/img/logo.svg' alt='Pi-hole logo' id="pihole_logo_splash" />
<p>Pi-<strong>hole</strong>: Your black hole for Internet advertisements</p>
<a href='/admin'>Did you mean to go to the admin panel?</a>
</div>
diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh
index 07683204..eb52aea3 100755
--- a/automated install/basic-install.sh
+++ b/automated install/basic-install.sh
@@ -1025,9 +1025,8 @@ valid_ip() {
# Regex matching one IPv4 component, i.e. an integer from 0 to 255.
# See https://tools.ietf.org/html/rfc1340
local ipv4elem="(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)";
- # Regex matching an optional port beginning with : from 0 to 65535
- # See https://tools.ietf.org/html/rfc1340#page-33
- local portelem="(:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))?";
+ # Regex matching an optional port (starting with '#') range of 1-65536
+ local portelem="(#(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))?";
# Build a full IPv4 regex from the above subexpressions
local regex="^${ipv4elem}\.${ipv4elem}\.${ipv4elem}\.${ipv4elem}${portelem}$"
@@ -1046,8 +1045,8 @@ valid_ip6() {
local ipv6elem="[0-9a-fA-F]{1,4}"
# Regex matching an IPv6 CIDR, i.e. 1 to 128
local v6cidr="(\\/([1-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])){0,1}"
- # Regex matching an optional port beginning with # matching optional port number starting '#' with range of 1-65536
- local portelem="(#([1-9]|[1-8][0-9]|9[0-9]|[1-8][0-9]{2}|9[0-8][0-9]|99[0-9]|[1-8][0-9]{3}|9[0-8][0-9]{2}|99[0-8][0-9]|999[0-9]|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-6]))?"
+ # Regex matching an optional port (starting with '#') range of 1-65536
+ local portelem="(#(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))?";
# Build a full IPv6 regex from the above subexpressions
local regex="^(((${ipv6elem}))*((:${ipv6elem}))*::((${ipv6elem}))*((:${ipv6elem}))*|((${ipv6elem}))((:${ipv6elem})){7})${v6cidr}${portelem}$"
diff --git a/test/test_automated_install.py b/test/test_automated_install.py
index 1266f46b..44624082 100644
--- a/test/test_automated_install.py
+++ b/test/test_automated_install.py
@@ -546,23 +546,23 @@ def test_validate_ip(Pihole):
test_address('256.255.255.255', False)
test_address('1092.168.1.1', False)
test_address('not an IP', False)
- test_address('8.8.8.8:', False)
- test_address('8.8.8.8:0')
- test_address('8.8.8.8:1')
- test_address('8.8.8.8:42')
- test_address('8.8.8.8:888')
- test_address('8.8.8.8:1337')
- test_address('8.8.8.8:65535')
- test_address('8.8.8.8:65536', False)
- test_address('8.8.8.8:-1', False)
+ test_address('8.8.8.8#', False)
+ test_address('8.8.8.8#0')
+ test_address('8.8.8.8#1')
+ test_address('8.8.8.8#42')
+ test_address('8.8.8.8#888')
+ test_address('8.8.8.8#1337')
+ test_address('8.8.8.8#65535')
+ test_address('8.8.8.8#65536', False)
+ test_address('8.8.8.8#-1', False)
test_address('00.0.0.0', False)
test_address('010.0.0.0', False)
test_address('001.0.0.0', False)
- test_address('0.0.0.0:00', False)
- test_address('0.0.0.0:01', False)
- test_address('0.0.0.0:001', False)
- test_address('0.0.0.0:0001', False)
- test_address('0.0.0.0:00001', False)
+ test_address('0.0.0.0#00', False)
+ test_address('0.0.0.0#01', False)
+ test_address('0.0.0.0#001', False)
+ test_address('0.0.0.0#0001', False)
+ test_address('0.0.0.0#00001', False)
def test_os_check_fails(Pihole):