fix validation of system-hostname setting, thx to lando

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2014-06-07 15:04:51 +02:00
parent f1eb5420a7
commit 74b71bb926
3 changed files with 5 additions and 4 deletions

View File

@@ -17,8 +17,9 @@
function checkHostname($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues)
{
if (0 == strlen(trim($newfieldvalue)))
{
if (0 == strlen(trim($newfieldvalue))
|| validateDomain($newfieldvalue) === false
) {
return array(FORMFIELDS_PLAUSIBILITY_CHECK_ERROR, 'invalidhostname');
} else {
return array(FORMFIELDS_PLAUSIBILITY_CHECK_OK);