mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-27 01:30:18 +00:00
Return default port if non-numeric characters are set in pihole-FTL.conf for FTLPORT. FTL does the same in such case and provide the API on 4711
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
25ba68104b
commit
276c480f50
2 changed files with 5 additions and 7 deletions
|
@ -92,7 +92,7 @@ def test_getFTLAPIPort_custom(host):
|
|||
|
||||
|
||||
def test_getFTLAPIPort_malicious(host):
|
||||
"""Confirms getFTLAPIPort returns -1 if the setting in pihole-FTL.conf contains non-digits"""
|
||||
"""Confirms getFTLAPIPort returns 4711 if the setting in pihole-FTL.conf contains non-digits"""
|
||||
host.run(
|
||||
"""
|
||||
echo "FTLPORT=*$ssdfsd" > /etc/pihole/pihole-FTL.conf
|
||||
|
@ -104,7 +104,7 @@ def test_getFTLAPIPort_malicious(host):
|
|||
getFTLAPIPort
|
||||
"""
|
||||
)
|
||||
expected_stdout = "-1\n"
|
||||
expected_stdout = "4711\n"
|
||||
assert expected_stdout == output.stdout
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue