and more and more and more
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -91,7 +91,7 @@ if ($action == 'delete') {
|
||||
$ip_list = array_map('trim', explode(",", $allowed_from));
|
||||
$_check_list = $ip_list;
|
||||
foreach ($_check_list as $idx => $ip) {
|
||||
if (validate_ip2($ip, true, 'invalidip', true, true) == false) {
|
||||
if (\Froxlor\Validate\Validate::validate_ip2($ip, true, 'invalidip', true, true) == false) {
|
||||
unset($ip_list[$idx]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,9 +237,9 @@ class Admins extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
||||
} // Accounts which match systemaccounts are not allowed, filtering them
|
||||
elseif (preg_match('/^' . preg_quote(Settings::Get('customer.accountprefix'), '/') . '([0-9]+)/', $loginname)) {
|
||||
\Froxlor\UI\Response::standard_error('loginnameissystemaccount', Settings::Get('customer.accountprefix'), true);
|
||||
} elseif (! validateUsername($loginname)) {
|
||||
} elseif (! \Froxlor\Validate\Validate::validateUsername($loginname)) {
|
||||
\Froxlor\UI\Response::standard_error('loginnameiswrong', $loginname, true);
|
||||
} elseif (! validateEmail($email)) {
|
||||
} elseif (! \Froxlor\Validate\Validate::validateEmail($email)) {
|
||||
\Froxlor\UI\Response::standard_error('emailiswrong', $email, true);
|
||||
} else {
|
||||
|
||||
@@ -504,7 +504,7 @@ class Admins extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
||||
$theme = Settings::Get('panel.default_theme');
|
||||
}
|
||||
|
||||
if (! validateEmail($email)) {
|
||||
if (! \Froxlor\Validate\Validate::validateEmail($email)) {
|
||||
\Froxlor\UI\Response::standard_error('emailiswrong', $email, true);
|
||||
} else {
|
||||
|
||||
|
||||
@@ -300,7 +300,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
||||
\Froxlor\UI\Response::standard_error('youcantallocatemorethanyouhave', '', true);
|
||||
}
|
||||
|
||||
if (! validateEmail($email)) {
|
||||
if (! \Froxlor\Validate\Validate::validateEmail($email)) {
|
||||
\Froxlor\UI\Response::standard_error('emailiswrong', $email, true);
|
||||
} else {
|
||||
|
||||
@@ -342,7 +342,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
||||
|
||||
if (strtolower($loginname_check['loginname']) == strtolower($loginname) || strtolower($loginname_check_admin['loginname']) == strtolower($loginname)) {
|
||||
\Froxlor\UI\Response::standard_error('loginnameexists', $loginname, true);
|
||||
} elseif (! validateUsername($loginname, Settings::Get('panel.unix_names'), 14 - strlen(Settings::Get('customer.mysqlprefix')))) {
|
||||
} elseif (! \Froxlor\Validate\Validate::validateUsername($loginname, Settings::Get('panel.unix_names'), 14 - strlen(Settings::Get('customer.mysqlprefix')))) {
|
||||
if (strlen($loginname) > 14 - strlen(Settings::Get('customer.mysqlprefix'))) {
|
||||
\Froxlor\UI\Response::standard_error('loginnameiswrong2', 14 - strlen(Settings::Get('customer.mysqlprefix')), true);
|
||||
} else {
|
||||
@@ -934,7 +934,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
||||
'stringisempty',
|
||||
'emailadd'
|
||||
), '', true);
|
||||
} elseif (! validateEmail($email)) {
|
||||
} elseif (!\Froxlor\Validate\Validate::validateEmail($email)) {
|
||||
\Froxlor\UI\Response::standard_error('emailiswrong', $email, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
), '', \Froxlor\Validate\Validate::validate($p_domain, 'domain')));
|
||||
|
||||
// Check whether domain validation is enabled and if, validate the domain
|
||||
if (Settings::Get('system.validate_domain') && ! validateDomain($domain)) {
|
||||
if (Settings::Get('system.validate_domain') && ! \Froxlor\Validate\Validate::validateDomain($domain)) {
|
||||
\Froxlor\UI\Response::standard_error(array(
|
||||
'stringiswrong',
|
||||
'mydomain'
|
||||
|
||||
@@ -100,7 +100,7 @@ class EmailAccounts extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Reso
|
||||
// alternative email address to send info to
|
||||
if (Settings::Get('panel.sendalternativemail') == 1) {
|
||||
$alternative_email = $idna_convert->encode(\Froxlor\Validate\Validate::validate($alternative_email, 'alternative_email', '', '', array(), true));
|
||||
if (! validateEmail($alternative_email)) {
|
||||
if (! \Froxlor\Validate\Validate::validateEmail($alternative_email)) {
|
||||
\Froxlor\UI\Response::standard_error('emailiswrong', $alternative_email, true);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -70,7 +70,7 @@ class EmailForwarders extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Re
|
||||
// prepare destination
|
||||
$destination = trim($destination);
|
||||
|
||||
if (! validateEmail($destination)) {
|
||||
if (! \Froxlor\Validate\Validate::validateEmail($destination)) {
|
||||
\Froxlor\UI\Response::standard_error('destinationiswrong', $destination, true);
|
||||
} elseif ($destination == $result['email']) {
|
||||
\Froxlor\UI\Response::standard_error('destinationalreadyexistasmail', $destination, true);
|
||||
|
||||
@@ -86,7 +86,7 @@ class Emails extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
||||
$email_full = $email_part . '@' . $domain;
|
||||
|
||||
// validate it
|
||||
if (! validateEmail($email_full)) {
|
||||
if (! \Froxlor\Validate\Validate::validateEmail($email_full)) {
|
||||
\Froxlor\UI\Response::standard_error('emailiswrong', $email_full, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ class IpsAndPorts extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
||||
{
|
||||
if ($this->isAdmin() && $this->getUserDetail('change_serversettings')) {
|
||||
|
||||
$ip = validate_ip2($this->getParam('ip'), false, 'invalidip', false, false, false, true);
|
||||
$ip = \Froxlor\Validate\Validate::validate_ip2($this->getParam('ip'), false, 'invalidip', false, false, false, true);
|
||||
$port = \Froxlor\Validate\Validate::validate($this->getParam('port', true, 80), 'port', '/^(([1-9])|([1-9][0-9])|([1-9][0-9][0-9])|([1-9][0-9][0-9][0-9])|([1-5][0-9][0-9][0-9][0-9])|(6[0-4][0-9][0-9][0-9])|(65[0-4][0-9][0-9])|(655[0-2][0-9])|(6553[0-5]))$/Di', array(
|
||||
'stringisempty',
|
||||
'myport'
|
||||
@@ -302,7 +302,7 @@ class IpsAndPorts extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
||||
'id' => $id
|
||||
));
|
||||
|
||||
$ip = validate_ip2($this->getParam('ip', true, $result['ip']), false, 'invalidip', false, false, false, true);
|
||||
$ip = \Froxlor\Validate\Validate::validate_ip2($this->getParam('ip', true, $result['ip']), false, 'invalidip', false, false, false, true);
|
||||
$port = \Froxlor\Validate\Validate::validate($this->getParam('port', true, $result['port']), 'port', '/^(([1-9])|([1-9][0-9])|([1-9][0-9][0-9])|([1-9][0-9][0-9][0-9])|([1-5][0-9][0-9][0-9][0-9])|(6[0-4][0-9][0-9][0-9])|(65[0-4][0-9][0-9])|(655[0-2][0-9])|(6553[0-5]))$/Di', array(
|
||||
'stringisempty',
|
||||
'myport'
|
||||
|
||||
@@ -186,7 +186,7 @@ class Check
|
||||
}
|
||||
|
||||
$returnvalue = array();
|
||||
if (validateUsername($newfieldvalue, Settings::Get('panel.unix_names'), 14 - strlen($allnewfieldvalues['customer_mysqlprefix'])) === true) {
|
||||
if (Validate::validateUsername($newfieldvalue, Settings::Get('panel.unix_names'), 14 - strlen($allnewfieldvalues['customer_mysqlprefix'])) === true) {
|
||||
$returnvalue = array(
|
||||
FORMFIELDS_PLAUSIBILITY_CHECK_OK
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user