Check that domains contain dots
This commit is contained in:
parent
27f819f4ef
commit
88a987446f
|
@ -1846,9 +1846,11 @@ function domain_blocking_add {
|
||||||
0)
|
0)
|
||||||
blocked_domain=$(<$data)
|
blocked_domain=$(<$data)
|
||||||
if [ ${#blocked_domain} -gt 2 ]; then
|
if [ ${#blocked_domain} -gt 2 ]; then
|
||||||
firewall_block_domain $blocked_domain
|
if [[ "${blocked_domain}" == '.' ]]; then
|
||||||
dialog --title $"Block a domain" \
|
firewall_block_domain $blocked_domain
|
||||||
--msgbox $"The domain $blocked_domain has been blocked" 6 40
|
dialog --title $"Block a domain" \
|
||||||
|
--msgbox $"The domain $blocked_domain has been blocked" 6 40
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -1865,9 +1867,11 @@ function domain_blocking_remove {
|
||||||
0)
|
0)
|
||||||
unblocked_domain=$(<$data)
|
unblocked_domain=$(<$data)
|
||||||
if [ ${#unblocked_domain} -gt 2 ]; then
|
if [ ${#unblocked_domain} -gt 2 ]; then
|
||||||
firewall_unblock_domain $unblocked_domain
|
if [[ "${unblocked_domain}" == '.' ]]; then
|
||||||
dialog --title $"Unblock a domain" \
|
firewall_unblock_domain $unblocked_domain
|
||||||
--msgbox $"The domain $unblocked_domain has been unblocked" 6 40
|
dialog --title $"Unblock a domain" \
|
||||||
|
--msgbox $"The domain $unblocked_domain has been unblocked" 6 40
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue