Revision b887348c
Added by Marco Pannetto over 6 years ago
src/etc/inc/pfsense-utils.inc | ||
---|---|---|
1890 | 1890 |
} |
1891 | 1891 |
|
1892 | 1892 |
function is_fqdn($fqdn) { |
1893 |
return (bool) filter_var($fqdn, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME);
|
|
1893 |
return 1 < substr_count(rtrim(filter_var($fqdn, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME), '.'), '.');
|
|
1894 | 1894 |
} |
1895 | 1895 |
|
1896 | 1896 |
function pfsense_default_state_size() { |
Also available in: Unified diff
Properly detect valid trailing dots
Count dots, detect a trailing one and remove it for counting. Must have at least 2 dots.