From d5c41ee210f9e29688e3a7e740fe721abb36823b Mon Sep 17 00:00:00 2001 From: alexalouit Date: Thu, 24 Nov 2016 19:53:45 +0100 Subject: [PATCH] Revert "fix Let's Encrypt add web domain alias support" This reverts commit 0b73ad567fb4c31f3a9d60e430bdb67e2d45fd12 --- interface/web/login/index.php | 6 +++--- interface/web/mail/list/xmpp_user.list.php | 2 +- interface/web/mail/xmpp_domain_edit.php | 2 +- .../themes/default/assets/javascripts/ispconfig.js | 2 ++ interface/web/themes/default/templates/main.tpl.htm | 2 +- .../classes/cron.d/100-monitor_system_update.inc.php | 12 ------------ server/lib/classes/monitor_tools.inc.php | 8 ++++---- 7 files changed, 12 insertions(+), 22 deletions(-) diff --git a/interface/web/login/index.php b/interface/web/login/index.php index 75a013b81..51a7a66bd 100644 --- a/interface/web/login/index.php +++ b/interface/web/login/index.php @@ -63,7 +63,7 @@ if(count($_POST) > 0) { if(!preg_match("/^.{1,256}$/i", $_POST['password'])) $error = $app->lng('pw_error_length'); //** importing variables - $ip = ip2long($_SERVER['REMOTE_ADDR']); + $ip = md5($_SERVER['REMOTE_ADDR']); $username = $_POST['username']; $password = $_POST['password']; $loginAs = false; @@ -262,7 +262,7 @@ if(count($_POST) > 0) { $app->plugin->raiseEvent('login', $this); //* Save successfull login message to var - $authlog = 'Successful login for user \''. $username .'\' from '. long2ip($ip) .' at '. date('Y-m-d H:i:s'); + $authlog = 'Successful login for user \''. $username .'\' from '. $_SERVER['REMOTE_ADDR'] .' at '. date('Y-m-d H:i:s'); $authlog_handle = fopen($conf['ispconfig_log_dir'].'/auth.log', 'a'); fwrite($authlog_handle, $authlog ."\n"); fclose($authlog_handle); @@ -300,7 +300,7 @@ if(count($_POST) > 0) { $app->plugin->raiseEvent('login_failed', $this); //* Save failed login message to var - $authlog = 'Failed login for user \''. $username .'\' from '. long2ip($ip) .' at '. date('Y-m-d H:i:s'); + $authlog = 'Failed login for user \''. $username .'\' from '. $_SERVER['REMOTE_ADDR'] .' at '. date('Y-m-d H:i:s'); $authlog_handle = fopen($conf['ispconfig_log_dir'].'/auth.log', 'a'); fwrite($authlog_handle, $authlog ."\n"); fclose($authlog_handle); diff --git a/interface/web/mail/list/xmpp_user.list.php b/interface/web/mail/list/xmpp_user.list.php index c1cdbb8d4..075e7c455 100644 --- a/interface/web/mail/list/xmpp_user.list.php +++ b/interface/web/mail/list/xmpp_user.list.php @@ -47,7 +47,7 @@ $liste["auth"] = "yes"; * Suchfelder *****************************************************/ -$liste["item"][] = array( 'field' => "JID", +$liste["item"][] = array( 'field' => "jid", 'datatype' => "VARCHAR", 'filters' => array( 0 => array( 'event' => 'SHOW', 'type' => 'IDNTOUTF8') diff --git a/interface/web/mail/xmpp_domain_edit.php b/interface/web/mail/xmpp_domain_edit.php index 3f62dbdb0..aaa8d640e 100644 --- a/interface/web/mail/xmpp_domain_edit.php +++ b/interface/web/mail/xmpp_domain_edit.php @@ -402,7 +402,7 @@ class page_action extends tform_actions { // $this->desyncMailusers($this->dataRecord['domain']); // Update DNS Records // TODO: Update gets only triggered from main form. WHY? - $soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other FROM dns_soa WHERE active = 'Y' AND `origin` = ?", $this->dataRecord['domain'].'.'); + $soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, server_id FROM dns_soa WHERE active = 'Y' AND `origin` = ?", $this->dataRecord['domain'].'.'); if ( isset($soa) && !empty($soa) ) $this->update_dns($this->dataRecord, $soa); } diff --git a/interface/web/themes/default/assets/javascripts/ispconfig.js b/interface/web/themes/default/assets/javascripts/ispconfig.js index 881dfb2c1..fcd5167a8 100644 --- a/interface/web/themes/default/assets/javascripts/ispconfig.js +++ b/interface/web/themes/default/assets/javascripts/ispconfig.js @@ -768,6 +768,8 @@ $(document).on('ready', function () { $('.progress .progress-bar').css('width', function () { return $(this).attr('aria-valuenow') + '%'; }); + + ISPConfig.loadInitContent(); $('#searchform').submit(function(e) { e.preventDefault(); diff --git a/interface/web/themes/default/templates/main.tpl.htm b/interface/web/themes/default/templates/main.tpl.htm index 0dde5f801..3b58c049f 100644 --- a/interface/web/themes/default/templates/main.tpl.htm +++ b/interface/web/themes/default/templates/main.tpl.htm @@ -141,7 +141,7 @@ searchFieldWatermark: '', resultBoxPosition: '' }); - ISPConfig.loadInitContent(); + }); //--> diff --git a/server/lib/classes/cron.d/100-monitor_system_update.inc.php b/server/lib/classes/cron.d/100-monitor_system_update.inc.php index c610a8494..bc4f52107 100644 --- a/server/lib/classes/cron.d/100-monitor_system_update.inc.php +++ b/server/lib/classes/cron.d/100-monitor_system_update.inc.php @@ -159,18 +159,6 @@ class cronjob_monitor_system_update extends cronjob { * Fetch the output */ $data['output'] = shell_exec('zypper lu'); - } else if (file_exists('/etc/redhat-release')) { - - if(shell_exec("yum list updates | awk 'p; /Updated Packages/ {p=1}'") == '') { - // There is nothing to update - $state = 'ok'; - } - else { - $state = 'info'; - } - // Fetch the output - $yumData = shell_exec('yum check-update'); - $data['output'] = $yumData; } else { /* * It is not Debian/Ubuntu, so there is no data and no state diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index 61f20e068..a9c805ced 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -265,23 +265,23 @@ class monitor_tools { $distbaseid = 'fedora'; } elseif(stristr($content, 'CentOS release 5')) { $distname = 'CentOS'; - $distver = '5'; + $distver = 'Unknown'; $distid = 'centos53'; $distbaseid = 'fedora'; } elseif(stristr($content, 'CentOS Linux release 6')) { $distname = 'CentOS'; - $distver = '6'; + $distver = 'Unknown'; $distid = 'centos53'; $distbaseid = 'fedora'; } elseif(stristr($content, 'CentOS Linux release 7.2')) { $distname = 'CentOS'; - $distver = '7.2'; + $distver = 'Unknown'; $distid = 'centos70'; $distconfid = 'centos72'; $distbaseid = 'fedora'; } elseif(stristr($content, 'CentOS Linux release 7')) { $distname = 'CentOS'; - $distver = '7'; + $distver = 'Unknown'; $distid = 'centos70'; $distbaseid = 'fedora'; } else { -- GitLab