Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -12,7 +12,7 @@
|
||||
namespace IPS\nexus\Hosting\Cpanel;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -31,7 +31,7 @@ class _Server extends \IPS\nexus\Hosting\Server
|
||||
*/
|
||||
public static function extraFormFields( \IPS\nexus\Hosting\Server $server )
|
||||
{
|
||||
$class = get_class();
|
||||
$class = \get_class();
|
||||
return array(
|
||||
'server_cpanel_username' => new \IPS\Helpers\Form\Text( 'server_cpanel_username', $server->username ?: 'root', NULL, array(), function( $val )
|
||||
{
|
||||
@@ -116,7 +116,7 @@ class _Server extends \IPS\nexus\Hosting\Server
|
||||
public function checkUsername( $username )
|
||||
{
|
||||
if (
|
||||
in_array( $username, array( 'root', 'virtfs', 'roundcube', 'horde', 'spamassassin', 'eximstats', 'cphulkd', 'modsec', 'all', 'dovecot', 'tomcat', 'postgres', 'mailman', 'proftpd', 'cpbackup', 'files', 'dirs', 'tmp', 'toor', 'munin' ) )
|
||||
\in_array( $username, array( 'root', 'virtfs', 'roundcube', 'horde', 'spamassassin', 'eximstats', 'cphulkd', 'modsec', 'all', 'dovecot', 'tomcat', 'postgres', 'mailman', 'proftpd', 'cpbackup', 'files', 'dirs', 'tmp', 'toor', 'munin' ) )
|
||||
OR mb_substr( $username, 0, 4 ) == 'test'
|
||||
OR mb_substr( $username, -7 ) == 'assword'
|
||||
) {
|
||||
@@ -145,8 +145,8 @@ class _Server extends \IPS\nexus\Hosting\Server
|
||||
{
|
||||
$return[ $account['user'] ] = array(
|
||||
'domain' => $account['domain'],
|
||||
'disklimit' => intval( str_replace( 'M', '', $account['disklimit'] ) ) * 1000000,
|
||||
'diskused' => intval( str_replace( 'M', '', $account['diskused'] ) ) * 1000000,
|
||||
'disklimit' => \intval( str_replace( 'M', '', $account['disklimit'] ) ) * 1000000,
|
||||
'diskused' => \intval( str_replace( 'M', '', $account['diskused'] ) ) * 1000000,
|
||||
'active' => !$account['suspended'],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user