From ebbe6374fc9c308daf729d2ad1b2f8007ed771ce Mon Sep 17 00:00:00 2001 From: Marius Cramer <m.cramer@pixcept.de> Date: Mon, 17 Feb 2014 05:34:43 -0500 Subject: [PATCH] Merge remote-tracking branch 'origin/stable-3.0.5' --- interface/web/login/lib/lang/en.lng | 6 install/dist/lib/fedora.lib.php | 3 interface/web/sites/lib/lang/en_web_vhost_domain.lng | 2 remoting_client/API-docs/sites_web_aliasdomain_update.html | 1 interface/web/client/templates/client_edit_address.htm | 4 interface/web/sites/aps_install_package.php | 2 interface/web/sites/templates/web_folder_user_edit.htm | 4 interface/web/mailuser/mail_user_spamfilter_edit.php | 3 server/conf/vhost.conf.master | 18 install/lib/installer_base.lib.php | 22 install/sql/ispconfig3.sql | 13 interface/lib/classes/tform_actions.inc.php | 1 server/plugins-available/apache2_plugin.inc.php | 4 interface/lib/classes/remoting.inc.php | 7 interface/web/help/templates/faq_manage_questions_list.htm | 8 interface/web/admin/templates/users_user_edit.htm | 4 server/plugins-available/bind_plugin.inc.php | 8 interface/web/js/scrigo.js.php | 2 interface/web/mailuser/templates/mail_user_cc_edit.htm | 2 interface/web/mailuser/templates/mail_user_password_edit.htm | 4 interface/web/sites/web_vhost_domain_edit.php | 43 + install/tpl/mysql-virtual_forwardings.cf.master | 3 interface/web/dns/form/dns_srv.tform.php | 2 interface/web/tools/lib/lang/de_resync.lng | 1 interface/web/dns/form/dns_rp.tform.php | 2 interface/web/dns/form/dns_mx.tform.php | 4 interface/web/sites/templates/web_vhost_domain_advanced.htm | 2 install/tpl/opensuse_pureftpd_conf.master | 3 interface/web/tools/templates/user_settings.htm | 4 server/mods-available/rescue_core_module.inc.php | 11 interface/web/dns/form/dns_aaaa.tform.php | 2 interface/lib/classes/tools_monitor.inc.php | 4 interface/web/sites/templates/ftp_user_edit.htm | 4 interface/web/sites/templates/shell_user_edit.htm | 4 interface/web/admin/form/system_config.tform.php | 2 interface/web/mail/lib/lang/de_mail_user.lng | 4 interface/web/mail/lib/lang/en_mail_user.lng | 3 interface/web/mail/form/mail_user.tform.php | 2 interface/lib/classes/aps_crawler.inc.php | 39 + interface/web/dns/form/dns_alias.tform.php | 4 interface/lib/classes/tform_base.inc.php | 2 interface/lib/classes/functions.inc.php | 5 interface/web/client/templates/reseller_edit_address.htm | 4 interface/web/dns/form/dns_txt.tform.php | 2 server/conf/php_fpm_pool.conf.master | 1 install/tpl/debian_postfix.conf.master | 2 interface/lib/classes/tform_tpl_generator.inc.php | 4 interface/web/sites/templates/database_user_edit.htm | 4 interface/web/dns/form/dns_soa.tform.php | 6 interface/web/dns/form/dns_ns.tform.php | 4 server/conf/sieve_filter.master | 4 interface/web/dns/form/dns_a.tform.php | 2 install/tpl/opensuse_postfix.conf.master | 2 server/conf/php-fcgi-starter.master | 1 interface/lib/classes/validate_cron.inc.php | 2 install/sql/incremental/upd_0068.sql | 4 interface/web/dns/form/dns_ptr.tform.php | 4 install/lib/install.lib.php | 31 + interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php | 4 interface/web/admin/templates/remote_user_edit.htm | 4 interface/web/mailuser/form/mail_user_cc.tform.php | 3 interface/web/sites/shell_user_edit.php | 1 remoting_client/API-docs/sites_database_add.html | 1 server/lib/classes/cron.d/100-monitor_raid.inc.php | 4 server/lib/classes/cron.d/300-quota_notify.inc.php | 8 server/plugins-available/maildrop_plugin.inc.php | 6 interface/web/mailuser/lib/lang/de_mail_user_cc.lng | 2 server/plugins-available/nginx_plugin.inc.php | 1 interface/lib/classes/db_mysql.inc.php | 3 server/lib/classes/cron.d/500-backup.inc.php | 3 remoting_client/examples/sites_web_domain_add.php | 3 server/lib/classes/aps_installer.inc.php | 4 server/lib/classes/system.inc.php | 39 + interface/web/dns/form/dns_cname.tform.php | 4 install/tpl/debian_dovecot2.conf.master | 1 install/dist/lib/opensuse.lib.php | 19 interface/web/dns/form/dns_hinfo.tform.php | 2 install/tpl/gentoo_postfix.conf.master | 2 server/conf/sieve_filter_1.2.master | 4 server/lib/classes/cron.d/100-monitor_email_quota.inc.php | 4 install/tpl/jk_init.ini.master | 4 interface/web/dns/form/dns_slave.tform.php | 7 interface/web/mailuser/lib/lang/en_mail_user_cc.lng | 2 interface/web/js/jquery.tipsy.js | 864 ++++++++++++++++++----------------- remoting_client/examples/sites_database_add.php | 1 interface/web/mail/templates/mail_mailinglist_edit.htm | 4 install/tpl/fedora_postfix.conf.master | 2 remoting_client/API-docs/sites_web_domain_add.html | 1 server/plugins-available/maildeliver_plugin.inc.php | 7 interface/web/mail/templates/mail_user_mailbox_edit.htm | 6 install/dist/lib/debian60.lib.php | 4 install/uninstall.php | 10 server/scripts/create_jailkit_user.sh | 6 interface/web/sites/templates/webdav_user_edit.htm | 4 94 files changed, 805 insertions(+), 584 deletions(-) diff --git a/install/dist/lib/debian60.lib.php b/install/dist/lib/debian60.lib.php index d792c5a..61c3073 100644 --- a/install/dist/lib/debian60.lib.php +++ b/install/dist/lib/debian60.lib.php @@ -91,6 +91,7 @@ } else { copy('tpl/debian6_dovecot2.conf.master', $config_dir.'/'.$configfile); } + replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0); } else { if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot.conf.master')) { copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot.conf.master', $config_dir.'/'.$configfile); @@ -115,6 +116,9 @@ chmod($config_dir.'/'.$configfile, 0600); chown($config_dir.'/'.$configfile, 'root'); chgrp($config_dir.'/'.$configfile, 'root'); + + // Dovecot shall ignore mounts in website directory + exec("doveadm mount add '/var/www/*' ignore"); } diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php index 2d3cc30..114ce64 100644 --- a/install/dist/lib/fedora.lib.php +++ b/install/dist/lib/fedora.lib.php @@ -461,6 +461,9 @@ exec("chmod 600 $config_dir/$configfile"); exec("chown root:root $config_dir/$configfile"); + + // Dovecot shall ignore mounts in website directory + exec("doveadm mount add '/var/www/*' ignore"); } diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php index 7d97977..fd4b517 100644 --- a/install/dist/lib/opensuse.lib.php +++ b/install/dist/lib/opensuse.lib.php @@ -496,6 +496,9 @@ exec("chmod 600 $config_dir/$configfile"); exec("chown root:root $config_dir/$configfile"); + + // Dovecot shall ignore mounts in website directory + exec("doveadm mount add '/srv/www/*' ignore"); } @@ -554,7 +557,9 @@ unset($content); // Add the clamav user to the vscan group - exec('groupmod --add-user clamav vscan'); + //exec('groupmod --add-user clamav vscan'); + $command = 'usermod -a -G clamav vscan'; + caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); } @@ -1076,18 +1081,22 @@ // and must be fixed as this will allow the apache user to read the ispconfig files. // Later this must run as own apache server or via suexec! if($conf['apache']['installed'] == true){ - $command = 'groupmod --add-user '.$conf['apache']['user'].' ispconfig'; + //$command = 'groupmod --add-user '.$conf['apache']['user'].' ispconfig'; + $command = 'usermod -a -G ispconfig '.$conf['apache']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); if(is_group('ispapps')){ - $command = 'groupmod --add-user '.$conf['apache']['user'].' ispapps'; + //$command = 'groupmod --add-user '.$conf['apache']['user'].' ispapps'; + $command = 'usermod -a -G ispapps '.$conf['apache']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); } } if($conf['nginx']['installed'] == true){ - $command = 'groupmod --add-user '.$conf['nginx']['user'].' ispconfig'; + //$command = 'groupmod --add-user '.$conf['nginx']['user'].' ispconfig'; + $command = 'usermod -a -G ispconfig '.$conf['nginx']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); if(is_group('ispapps')){ - $command = 'groupmod --add-user '.$conf['nginx']['user'].' ispapps'; + //$command = 'groupmod --add-user '.$conf['nginx']['user'].' ispapps'; + $command = 'usermod -a -G ispapps '.$conf['nginx']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); } } diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index 4d5fe87..5686ac1 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -637,6 +637,11 @@ $out .= $line; } } + if (!$found) { + if (trim($line) == $new_line) { + $found = 1; + } + } } if($found == 0) { //* add \n if the last line does not end with \n or \r @@ -719,6 +724,32 @@ } /* +* Get the port number of the ISPConfig apps vhost +*/ + +function get_apps_vhost_port_number() { + global $conf; + if($conf['nginx']['installed'] == true){ + $ispconfig_vhost_file = $conf['nginx']['vhost_conf_dir'].'/apps.vhost'; + $regex = '/listen (\d+)/'; + } else { + $ispconfig_vhost_file = $conf['apache']['vhost_conf_dir'].'/apps.vhost'; + $regex = '/\<VirtualHost.*\:(\d{1,})\>/'; + } + + if(is_file($ispconfig_vhost_file)) { + $tmp = file_get_contents($ispconfig_vhost_file); + preg_match($regex, $tmp, $matches); + $port_number = @intval($matches[1]); + if($port_number > 0) { + return $port_number; + } else { + return '8081'; + } + } +} + +/* * Get the port number of the ISPConfig controlpanel vhost */ diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 83895d9..5ebb669 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -474,7 +474,15 @@ $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); } - $query = "GRANT SELECT, UPDATE ON ".$value['db'].".`aps_instances` TO '".$value['user']."'@'".$host."' "; + $query = "GRANT SELECT, UPDATE, DELETE ON ".$value['db'].".`aps_instances` TO '".$value['user']."'@'".$host."' "; + if ($verbose){ + echo $query ."\n"; + } + if(!$this->dbmaster->query($query)) { + $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); + } + + $query = "GRANT SELECT, DELETE ON ".$value['db'].".`aps_instances_settings` TO '".$value['user']."'@'".$host."' "; if ($verbose){ echo $query ."\n"; } @@ -972,6 +980,7 @@ } else { copy('tpl/debian_dovecot2.conf.master', $config_dir.'/'.$configfile); } + replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0); } else { if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot.conf.master')) { copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot.conf.master', $config_dir.'/'.$configfile); @@ -996,6 +1005,9 @@ chmod($config_dir.'/'.$configfile, 0600); chown($config_dir.'/'.$configfile, 'root'); chgrp($config_dir.'/'.$configfile, 'root'); + + // Dovecot shall ignore mounts in website directory + exec("doveadm mount add '/var/www/*' ignore"); } @@ -1527,7 +1539,8 @@ if(!is_user($apps_vhost_user)) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); - $command = 'adduser '.$conf['apache']['user'].' '.$apps_vhost_group; + //$command = 'adduser '.$conf['apache']['user'].' '.$apps_vhost_group; + $command = 'usermod -a -G '.$apps_vhost_group.' '.$conf['apache']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); if(!@is_dir($install_dir)){ @@ -1542,6 +1555,11 @@ $vhost_conf_dir = $conf['apache']['vhost_conf_dir']; $vhost_conf_enabled_dir = $conf['apache']['vhost_conf_enabled_dir']; $apps_vhost_servername = ($conf['web']['apps_vhost_servername'] == '')?'':'ServerName '.$conf['web']['apps_vhost_servername']; + + //* Get the apps vhost port + if($this->is_update == true) { + $conf['web']['apps_vhost_port'] = get_apps_vhost_port_number(); + } // Dont just copy over the virtualhost template but add some custom settings $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apache_apps.vhost.master', 'tpl/apache_apps.vhost.master'); diff --git a/install/sql/incremental/upd_0068.sql b/install/sql/incremental/upd_0068.sql new file mode 100644 index 0000000..e7a0018 --- /dev/null +++ b/install/sql/incremental/upd_0068.sql @@ -0,0 +1,4 @@ +ALTER TABLE `dbispconfig`.`web_domain` ADD UNIQUE `serverdomain` ( `server_id` , `domain` ); +DROP INDEX rr ON dns_rr; +ALTER TABLE `dns_rr` CHANGE `name` `name` VARCHAR( 128 ) NOT NULL ; +CREATE INDEX `rr` ON dns_rr (`zone`,`type`,`name`); \ No newline at end of file diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index d43f956..d255aaa 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -229,7 +229,7 @@ `language` char(2) NOT NULL DEFAULT 'en', `usertheme` varchar(32) NOT NULL DEFAULT 'default', `template_master` int(11) unsigned NOT NULL DEFAULT '0', - `template_additional` text NOT NULL DEFAULT '', + `template_additional` text NOT NULL, `created_at` bigint(20) DEFAULT NULL, `locked` enum('n','y') NOT NULL DEFAULT 'n', `canceled` enum('n','y') NOT NULL DEFAULT 'n', @@ -450,7 +450,7 @@ `stamp` timestamp NOT NULL default CURRENT_TIMESTAMP, `serial` int(10) unsigned default NULL, PRIMARY KEY (`id`), - UNIQUE KEY `rr` (`zone`,`name`,`type`,`data`) + KEY `rr` (`zone`,`type`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -736,8 +736,8 @@ `server_id` int(11) unsigned NOT NULL default '0', `domain` varchar(255) NOT NULL default '', `dkim` ENUM( 'n', 'y' ) NOT NULL default 'n', - `dkim_private` mediumtext NOT NULL default '', - `dkim_public` mediumtext NOT NULL default '', + `dkim_private` mediumtext NOT NULL, + `dkim_public` mediumtext NOT NULL, `active` enum('n','y') NOT NULL, PRIMARY KEY (`domain_id`), KEY `server_id` (`server_id`,`domain`), @@ -1689,7 +1689,7 @@ `typ` varchar(16) NOT NULL default 'user', `active` tinyint(1) NOT NULL default '1', `language` varchar(2) NOT NULL default 'en', - `groups` TEXT NOT NULL default '', + `groups` TEXT NOT NULL, `default_group` int(11) unsigned NOT NULL default '0', `client_id` int(11) unsigned NOT NULL default '0', `id_rsa` VARCHAR( 2000 ) NOT NULL default '', @@ -1867,7 +1867,8 @@ `rewrite_rules` mediumtext, `added_date` date NOT NULL DEFAULT '0000-00-00', `added_by` varchar(255) DEFAULT NULL, - PRIMARY KEY (`domain_id`) + PRIMARY KEY (`domain_id`), + UNIQUE KEY `serverdomain` ( `server_id` , `domain` ) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- diff --git a/install/tpl/debian_dovecot2.conf.master b/install/tpl/debian_dovecot2.conf.master index 5b04c61..030b237 100644 --- a/install/tpl/debian_dovecot2.conf.master +++ b/install/tpl/debian_dovecot2.conf.master @@ -4,6 +4,7 @@ disable_plaintext_auth = no log_timestamp = "%Y-%m-%d %H:%M:%S " mail_privileged_group = vmail +postmaster_address = postmaster@example.com ssl_cert = </etc/postfix/smtpd.cert ssl_key = </etc/postfix/smtpd.key passdb { diff --git a/install/tpl/debian_postfix.conf.master b/install/tpl/debian_postfix.conf.master index e8f3d82..beb7140 100644 --- a/install/tpl/debian_postfix.conf.master +++ b/install/tpl/debian_postfix.conf.master @@ -19,7 +19,7 @@ transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{config_dir}/mysql-virtual_transports.cf relay_domains = mysql:{config_dir}/mysql-virtual_relaydomains.cf relay_recipient_maps = mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf -proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps +proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re smtpd_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf smtpd_client_message_rate_limit = 100 diff --git a/install/tpl/fedora_postfix.conf.master b/install/tpl/fedora_postfix.conf.master index f4367ef..2c3294e 100644 --- a/install/tpl/fedora_postfix.conf.master +++ b/install/tpl/fedora_postfix.conf.master @@ -16,7 +16,7 @@ transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{config_dir}/mysql-virtual_transports.cf relay_domains = mysql:{config_dir}/mysql-virtual_relaydomains.cf relay_recipient_maps = mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf -proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps +proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re smtpd_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf smtpd_client_message_rate_limit = 100 diff --git a/install/tpl/gentoo_postfix.conf.master b/install/tpl/gentoo_postfix.conf.master index 4401f70..7af96d3 100644 --- a/install/tpl/gentoo_postfix.conf.master +++ b/install/tpl/gentoo_postfix.conf.master @@ -16,7 +16,7 @@ transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{config_dir}/mysql-virtual_transports.cf relay_domains = mysql:{config_dir}/mysql-virtual_relaydomains.cf relay_recipient_maps = mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf -proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps +proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re smtpd_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf smtpd_client_message_rate_limit = 100 diff --git a/install/tpl/jk_init.ini.master b/install/tpl/jk_init.ini.master index b086462..d34332b 100644 --- a/install/tpl/jk_init.ini.master +++ b/install/tpl/jk_init.ini.master @@ -2,12 +2,12 @@ # this section probably needs adjustment on 64bit systems # or non-Linux systems comment = common files for all jails that need user/group information -libraries = /lib/libnsl.so.1, /lib64/libnsl.so.1, /lib/libnss*.so.2, /lib64/libnss*.so.2 +libraries = /lib/libnsl.so.1, /lib64/libnsl.so.1, /lib/libnss*.so.2, /lib64/libnss*.so.2, /lib/x86_64-linux-gnu/libnss*.so.2 regularfiles = /etc/nsswitch.conf, /etc/ld.so.conf [netbasics] comment = common files for all jails that need any internet connectivity -libraries = /lib/libnss_dns.so.2, /lib64/libnss_dns.so.2 +libraries = /lib/libnss_dns.so.2, /lib64/libnss_dns.so.2, /lib/x86_64-linux-gnu/libnss_dns.so.2 regularfiles = /etc/resolv.conf, /etc/host.conf, /etc/hosts, /etc/protocols [logbasics] diff --git a/install/tpl/mysql-virtual_forwardings.cf.master b/install/tpl/mysql-virtual_forwardings.cf.master index b3f3325..cf1debb 100644 --- a/install/tpl/mysql-virtual_forwardings.cf.master +++ b/install/tpl/mysql-virtual_forwardings.cf.master @@ -4,5 +4,6 @@ table = mail_forwarding select_field = destination where_field = source -additional_conditions = and active = 'y' and server_id = {server_id} +additional_conditions = and type != 'aliasdomain' and active = 'y' and server_id = {server_id} +# additional_conditions = and active = 'y' and server_id = {server_id} hosts = {mysql_server_ip} \ No newline at end of file diff --git a/install/tpl/opensuse_postfix.conf.master b/install/tpl/opensuse_postfix.conf.master index 4401f70..7af96d3 100644 --- a/install/tpl/opensuse_postfix.conf.master +++ b/install/tpl/opensuse_postfix.conf.master @@ -16,7 +16,7 @@ transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{config_dir}/mysql-virtual_transports.cf relay_domains = mysql:{config_dir}/mysql-virtual_relaydomains.cf relay_recipient_maps = mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf -proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps +proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re smtpd_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf smtpd_client_message_rate_limit = 100 diff --git a/install/tpl/opensuse_pureftpd_conf.master b/install/tpl/opensuse_pureftpd_conf.master index aa6d465..bf3fd05 100644 --- a/install/tpl/opensuse_pureftpd_conf.master +++ b/install/tpl/opensuse_pureftpd_conf.master @@ -43,7 +43,8 @@ # Fork in background -Daemonize yes +#Daemonize yes +Daemonize no diff --git a/install/uninstall.php b/install/uninstall.php index f2081d2..56cf0eb 100644 --- a/install/uninstall.php +++ b/install/uninstall.php @@ -95,7 +95,15 @@ // Delete the ispconfig files exec('rm -rf /usr/local/ispconfig'); -// echo "Please do not forget to delete the ispconfig user in the mysql.user table.\n\n"; + // Delete various other files + @unlink("/usr/local/bin/ispconfig_update.sh"); + @unlink("/usr/local/bin/ispconfig_update_from_svn.sh"); + @unlink("/var/spool/mail/ispconfig"); + @unlink("/var/www/ispconfig"); + @unlink("/var/www/php-fcgi-scripts/ispconfig"); + @unlink("/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter"); + + echo "Backups in /var/backup/ and log files in /var/log/ispconfig are not deleted."; echo "Finished uninstalling.\n"; } else { diff --git a/interface/lib/classes/aps_crawler.inc.php b/interface/lib/classes/aps_crawler.inc.php index 635b812..7bb2650 100644 --- a/interface/lib/classes/aps_crawler.inc.php +++ b/interface/lib/classes/aps_crawler.inc.php @@ -288,11 +288,26 @@ $sxe = new SimpleXMLElement($xml); $namespaces = $sxe->getDocNamespaces(true); foreach($namespaces as $ns => $url) $sxe->registerXPathNamespace($ns, $url); + + //Find highest version + $app_version = "0.0.0"; + $entry_pos = 1; + for ($p = 1; ; $p++) { + $app_version_tmp = parent::getXPathValue($sxe, 'entry[position()=' . $p . ']/a:version'); + if (strlen($app_version_tmp) < 1) break; + if (version_compare($app_version_tmp, $app_version) >= 0) { + $app_version = $app_version_tmp; + $entry_pos = $p; + } + } // Fetching values of interest - $app_name = parent::getXPathValue($sxe, 'entry[position()=1]/a:name'); - $app_version = parent::getXPathValue($sxe, 'entry[position()=1]/a:version'); - $app_release = parent::getXPathValue($sxe, 'entry[position()=1]/a:release'); + //$app_name = parent::getXPathValue($sxe, 'entry[position()=1]/a:name'); + //$app_version = parent::getXPathValue($sxe, 'entry[position()=1]/a:version'); + //$app_release = parent::getXPathValue($sxe, 'entry[position()=1]/a:release'); + $app_name = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/a:name"); + $app_version = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/a:version"); + $app_release = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/a:release"); // Find out a (possibly) existing package version $ex_ver = ''; @@ -315,9 +330,12 @@ // Check if we already have an old version of this app if(!empty($ex_ver) && version_compare($new_ver, $ex_ver) == 1) $apps_updated++; - $app_dl = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='aps']/@href"); - $app_filesize = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='aps']/@length"); - $app_metafile = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='meta']/@href"); + //$app_dl = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='aps']/@href"); + //$app_filesize = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='aps']/@length"); + //$app_metafile = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='meta']/@href"); + $app_dl = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/link[@a:type='aps']/@href"); + $app_filesize = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/link[@a:type='aps']/@length"); + $app_metafile = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/link[@a:type='meta']/@href"); //$this->app_download_url_list[$app_name.'-'.$new_ver.'.app.zip'] = $app_dl; // Skip ASP.net packages because they can't be used at all @@ -365,7 +383,8 @@ } // Download package license - $license = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='eula']/@href"); + //$license = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='eula']/@href"); + $license = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/link[@a:type='eula']/@href"); if($license != '') { $local_license = $local_intf_folder.'LICENSE'; @@ -379,7 +398,8 @@ } // Download package icon - $icon = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='icon']/@href"); + //$icon = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='icon']/@href"); + $icon = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/link[@a:type='icon']/@href"); if($icon != '') { $local_icon = $local_intf_folder.basename($icon); @@ -393,7 +413,8 @@ } // Download available screenshots - $screenshots = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='screenshot']", true); + //$screenshots = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='screenshot']", true); + $screenshots = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/link[@a:type='screenshot']", true); if(!empty($screenshots)) { foreach($screenshots as $screen) diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index f0e7a60..e0d3517 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -861,6 +861,9 @@ case 'blob': return 'blob'; break; + case 'date': + return 'date'; + break; } } diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php index a964634..8a287a4 100644 --- a/interface/lib/classes/functions.inc.php +++ b/interface/lib/classes/functions.inc.php @@ -229,7 +229,8 @@ if(preg_match($regex, $result['ip'])) $ips[] = $result['ip']; } } - + + /* $results = $app->db->queryAllRecords("SELECT xfer FROM dns_slave WHERE xfer != ''"); if(!empty($results) && is_array($results)){ foreach($results as $result){ @@ -260,6 +261,8 @@ } } } + */ + $results = $app->db->queryAllRecords("SELECT remote_ips FROM web_database WHERE remote_ips != ''"); if(!empty($results) && is_array($results)){ foreach($results as $result){ diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php index cbe693f..5541fcb 100644 --- a/interface/lib/classes/remoting.inc.php +++ b/interface/lib/classes/remoting.inc.php @@ -180,8 +180,11 @@ $session_id = $app->db->quote($session_id); $sql = "DELETE FROM remote_session WHERE remote_session = '$session_id'"; - $app->db->query($sql); - return $app->db->affectedRows() == 1; + if($app->db->query($sql) != false) { + return true; + } else { + return false; + } } //** protected functions ----------------------------------------------------------------------------------- diff --git a/interface/lib/classes/tform_actions.inc.php b/interface/lib/classes/tform_actions.inc.php index bb9e78e..df00265 100644 --- a/interface/lib/classes/tform_actions.inc.php +++ b/interface/lib/classes/tform_actions.inc.php @@ -314,6 +314,7 @@ //$this->dataRecord = $app->db->queryOneRecord("SELECT * FROM ".$liste["table"]." WHERE ".$liste["table_idx"]." = ".$this->id); $this->dataRecord = $app->tform->getDataRecord($this->id); + $app->plugin->raiseEvent($_SESSION['s']['module']['name'].':'.$app->tform->formDef['name'].':'.'on_check_delete', $this); $this->onBeforeDelete(); $app->plugin->raiseEvent($_SESSION['s']['module']['name'].':'.$app->tform->formDef['name'].':'.'on_before_delete', $this); diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php index 65f10c5..e295d55 100644 --- a/interface/lib/classes/tform_base.inc.php +++ b/interface/lib/classes/tform_base.inc.php @@ -1367,7 +1367,7 @@ } function getAuthSQL($perm, $table = '') { - if($_SESSION["s"]["user"]["typ"] == 'admin') { + if($_SESSION["s"]["user"]["typ"] == 'admin' || $_SESSION['s']['user']['mailuser_id'] > 0) { return '1'; } else { if ($table != ''){ diff --git a/interface/lib/classes/tform_tpl_generator.inc.php b/interface/lib/classes/tform_tpl_generator.inc.php index 635aa04..a2da276 100644 --- a/interface/lib/classes/tform_tpl_generator.inc.php +++ b/interface/lib/classes/tform_tpl_generator.inc.php @@ -271,9 +271,9 @@ $defaultValue = 'NULL'; break; case 'DATE': - $type = 'int64'; + $type = 'date'; $typevalue = ''; - $defaultValue = ($field["default"] != '')?$field["default"]:'0'; + $defaultValue = ($field["default"] != '')?$field["default"]:'0000-00-00'; break; } diff --git a/interface/lib/classes/tools_monitor.inc.php b/interface/lib/classes/tools_monitor.inc.php index 19f2ccd..fe316ce 100644 --- a/interface/lib/classes/tools_monitor.inc.php +++ b/interface/lib/classes/tools_monitor.inc.php @@ -415,7 +415,9 @@ } else { $data = unserialize($record['data']); - $html .= nl2br($data['output']); + // improve view @Author <info@typoworx.de> + //-- $html .= nl2br($data['output']); + $html .= '<xmp>' . $data['output'] . '</xmp>'; } $html .= '</div></div>'; diff --git a/interface/lib/classes/validate_cron.inc.php b/interface/lib/classes/validate_cron.inc.php index 7e95e18..27db600 100644 --- a/interface/lib/classes/validate_cron.inc.php +++ b/interface/lib/classes/validate_cron.inc.php @@ -52,7 +52,7 @@ if($parsed["scheme"] != "http" && $parsed["scheme"] != "https") return $this->get_error($validator['errmsg']); - if(preg_match("'^([a-z0-9][a-z0-9-]{0,62}\.)+([a-z]{2,30})$'i", $parsed["host"]) == false) return $this->get_error($validator['errmsg']); + if(preg_match("'^([a-z0-9][a-z0-9\-]{0,62}\.)+([A-Za-z0-9\-]{2,30})$'i", $parsed["host"]) == false) return $this->get_error($validator['errmsg']); } } diff --git a/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php b/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php index 4ca9f1f..670c5d6 100644 --- a/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php +++ b/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php @@ -80,10 +80,14 @@ $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ".$app->functions->intval(@$page_form->dataRecord["client_group_id"])); $client_id = $app->functions->intval($client["client_id"]); } else { + $client_group_id = $page_form->dataRecord["client_group_id"]; $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ".$app->functions->intval($page_form->dataRecord["client_group_id"])); $client_id = $app->functions->intval($client["client_id"]); } + $tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = $client_group_id"); + $client_user_id = $app->functions->intval(($tmp['userid'] > 0)?$tmp['userid']:1); + // Set the values for document_root, system_user and system_group $system_user = $app->db->quote('web'.$page_form->id); $system_group = $app->db->quote('client'.$client_id); diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php index 889e6d5..76079b1 100644 --- a/interface/web/admin/form/system_config.tform.php +++ b/interface/web/admin/form/system_config.tform.php @@ -128,7 +128,7 @@ 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/', + 'regex' => '/^[0-9a-zA-Z\:\/\-\.\_\[\]\?\=\&]{0,255}$/', 'errmsg'=> 'phpmyadmin_url_error_regex'), ), 'default' => '', diff --git a/interface/web/admin/templates/remote_user_edit.htm b/interface/web/admin/templates/remote_user_edit.htm index 69dd61c..347835f 100644 --- a/interface/web/admin/templates/remote_user_edit.htm +++ b/interface/web/admin/templates/remote_user_edit.htm @@ -13,7 +13,7 @@ <div class="ctrlHolder"> <label for="remote_password">{tmpl_var name='password_txt'}</label> - <input name="remote_password" id="password" value="{tmpl_var name='remote_password'}" size="30" maxlength="255" type="password" class="textInput" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> + <input name="remote_password" id="password" value="{tmpl_var name='remote_password'}" size="30" maxlength="255" type="password" class="textInput" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> </div> <div class="ctrlHolder"> <p class="label">{tmpl_var name='password_strength_txt'}</p> @@ -22,7 +22,7 @@ </div> <div class="ctrlHolder"> <label for="repeat_password">{tmpl_var name='repeat_password_txt'}</label> - <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" onkeyup="checkPassMatch('password','repeat_password');" /> + <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" autocomplete="off" onkeyup="checkPassMatch('password','repeat_password');" /> </div> <div id="confirmpasswordError" style="display:none;" class="confirmpassworderror">{tmpl_var name='password_mismatch_txt'}</div> <div id="confirmpasswordOK" style="display:none;" class="confirmpasswordok">{tmpl_var name='password_match_txt'}</div> diff --git a/interface/web/admin/templates/users_user_edit.htm b/interface/web/admin/templates/users_user_edit.htm index 186322e..b973a34 100644 --- a/interface/web/admin/templates/users_user_edit.htm +++ b/interface/web/admin/templates/users_user_edit.htm @@ -11,7 +11,7 @@ </div> <div class="ctrlHolder"> <label for="passwort">{tmpl_var name='passwort_txt'}</label> - <input name="passwort" id="passwort" value="{tmpl_var name='passwort'}" size="15" maxlength="100" type="password" class="textInput" onkeyup="pass_check(this.value);checkPassMatch('passwort','repeat_password');"/> <a href="javascript:void(0);" onclick="generatePassword('passwort','repeat_password');">{tmpl_var name='generate_password_txt'}</a> + <input name="passwort" id="passwort" value="{tmpl_var name='passwort'}" size="15" maxlength="100" type="password" class="textInput" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('passwort','repeat_password');"/> <a href="javascript:void(0);" onclick="generatePassword('passwort','repeat_password');">{tmpl_var name='generate_password_txt'}</a> </div> <div class="ctrlHolder"> <p class="label">{tmpl_var name='password_strength_txt'}</p> @@ -20,7 +20,7 @@ </div> <div class="ctrlHolder"> <label for="repeat_password">{tmpl_var name='repeat_password_txt'}</label> - <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" onkeyup="checkPassMatch('passwort','repeat_password');" /> + <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" autocomplete="off" onkeyup="checkPassMatch('passwort','repeat_password');" /> </div> <div id="confirmpasswordError" style="display:none;" class="confirmpassworderror">{tmpl_var name='password_mismatch_txt'}</div> <div id="confirmpasswordOK" style="display:none;" class="confirmpasswordok">{tmpl_var name='password_match_txt'}</div> diff --git a/interface/web/client/templates/client_edit_address.htm b/interface/web/client/templates/client_edit_address.htm index 6149a42..ea4b591 100644 --- a/interface/web/client/templates/client_edit_address.htm +++ b/interface/web/client/templates/client_edit_address.htm @@ -30,7 +30,7 @@ </div> <div class="ctrlHolder"> <label for="password">{tmpl_var name='password_txt'}</label> - <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> + <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> </div> <div class="ctrlHolder"> <p class="label">{tmpl_var name='password_strength_txt'}</p> @@ -39,7 +39,7 @@ </div> <div class="ctrlHolder"> <label for="repeat_password">{tmpl_var name='repeat_password_txt'}</label> - <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" onkeyup="checkPassMatch('password','repeat_password');" /> + <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" autocomplete="off" onkeyup="checkPassMatch('password','repeat_password');" /> </div> <div id="confirmpasswordError" style="display:none;" class="confirmpassworderror">{tmpl_var name='password_mismatch_txt'}</div> <div id="confirmpasswordOK" style="display:none;" class="confirmpasswordok">{tmpl_var name='password_match_txt'}</div> diff --git a/interface/web/client/templates/reseller_edit_address.htm b/interface/web/client/templates/reseller_edit_address.htm index 5495d0a..4156254 100644 --- a/interface/web/client/templates/reseller_edit_address.htm +++ b/interface/web/client/templates/reseller_edit_address.htm @@ -30,7 +30,7 @@ </div> <div class="ctrlHolder"> <label for="password">{tmpl_var name='password_txt'}</label> - <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> + <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> </div> <div class="ctrlHolder"> <p class="label">{tmpl_var name='password_strength_txt'}</p> @@ -39,7 +39,7 @@ </div> <div class="ctrlHolder"> <label for="repeat_password">{tmpl_var name='repeat_password_txt'}</label> - <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" onkeyup="checkPassMatch('password','repeat_password');" /> + <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" autocomplete="off" onkeyup="checkPassMatch('password','repeat_password');" /> </div> <div id="confirmpasswordError" style="display:none;" class="confirmpassworderror">{tmpl_var name='password_mismatch_txt'}</div> <div id="confirmpasswordOK" style="display:none;" class="confirmpasswordok">{tmpl_var name='password_match_txt'}</div> diff --git a/interface/web/dns/form/dns_a.tform.php b/interface/web/dns/form/dns_a.tform.php index 7d4d276..b7def7d 100644 --- a/interface/web/dns/form/dns_a.tform.php +++ b/interface/web/dns/form/dns_a.tform.php @@ -86,7 +86,7 @@ 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\a-zA-Z0-9\.\-\*]{0,64}$/', + 'regex' => '/^[a-zA-Z0-9\.\-\*]{0,64}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_aaaa.tform.php b/interface/web/dns/form/dns_aaaa.tform.php index c03423b..0550aa4 100644 --- a/interface/web/dns/form/dns_aaaa.tform.php +++ b/interface/web/dns/form/dns_aaaa.tform.php @@ -79,7 +79,7 @@ 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-\*]{0,64}$/', + 'regex' => '/^[a-zA-Z0-9\.\-\*]{0,64}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_alias.tform.php b/interface/web/dns/form/dns_alias.tform.php index b97889b..3325814 100644 --- a/interface/web/dns/form/dns_alias.tform.php +++ b/interface/web/dns/form/dns_alias.tform.php @@ -88,7 +88,7 @@ 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'name_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{1,255}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', @@ -117,7 +117,7 @@ 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'data_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{1,255}$/', 'errmsg'=> 'data_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_cname.tform.php b/interface/web/dns/form/dns_cname.tform.php index b9d246c..e2a86de 100644 --- a/interface/web/dns/form/dns_cname.tform.php +++ b/interface/web/dns/form/dns_cname.tform.php @@ -86,7 +86,7 @@ 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-\*]{0,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-\*]{0,255}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', @@ -115,7 +115,7 @@ 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'data_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{1,255}$/', 'errmsg'=> 'data_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_hinfo.tform.php b/interface/web/dns/form/dns_hinfo.tform.php index c64dea0..6e815f5 100644 --- a/interface/web/dns/form/dns_hinfo.tform.php +++ b/interface/web/dns/form/dns_hinfo.tform.php @@ -88,7 +88,7 @@ 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'name_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,64}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{1,64}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_mx.tform.php b/interface/web/dns/form/dns_mx.tform.php index 34268f9..6e0c7e3 100644 --- a/interface/web/dns/form/dns_mx.tform.php +++ b/interface/web/dns/form/dns_mx.tform.php @@ -87,7 +87,7 @@ 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-\*]{0,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{0,255}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', @@ -116,7 +116,7 @@ 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'data_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{1,255}$/', 'errmsg'=> 'data_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_ns.tform.php b/interface/web/dns/form/dns_ns.tform.php index 3eb39a9..5020977 100644 --- a/interface/web/dns/form/dns_ns.tform.php +++ b/interface/web/dns/form/dns_ns.tform.php @@ -86,7 +86,7 @@ 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{0,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{0,255}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', @@ -115,7 +115,7 @@ 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'data_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{1,255}$/', 'errmsg'=> 'data_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_ptr.tform.php b/interface/web/dns/form/dns_ptr.tform.php index 3ba441b..b749992 100644 --- a/interface/web/dns/form/dns_ptr.tform.php +++ b/interface/web/dns/form/dns_ptr.tform.php @@ -86,7 +86,7 @@ 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,256}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{1,256}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', @@ -115,7 +115,7 @@ 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'data_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,256}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{1,256}$/', 'errmsg'=> 'data_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_rp.tform.php b/interface/web/dns/form/dns_rp.tform.php index 86c43ed..3b7808e 100644 --- a/interface/web/dns/form/dns_rp.tform.php +++ b/interface/web/dns/form/dns_rp.tform.php @@ -86,7 +86,7 @@ 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{0,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{0,255}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_slave.tform.php b/interface/web/dns/form/dns_slave.tform.php index c518731..a416aed 100644 --- a/interface/web/dns/form/dns_slave.tform.php +++ b/interface/web/dns/form/dns_slave.tform.php @@ -96,7 +96,7 @@ 'errmsg'=> 'origin_error_unique'), */ 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-\/]{2,255}\.[a-zA-Z0-9\-]{2,10}[\.]{0,1}$/', + 'regex' => '/^[a-zA-Z0-9\.\-\/]{2,255}\.[a-zA-Z0-9\-]{2,10}[\.]{0,1}$/', 'errmsg'=> 'origin_error_regex'), ), 'default' => '', @@ -121,6 +121,11 @@ 'xfer' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', + 'validators' => array ( 0 => array ( 'type' => 'ISIP', + 'allowempty' => 'y', + 'separator' => ',', + 'errmsg'=> 'xfer_error_regex'), + ), 'default' => '', 'value' => '', 'width' => '30', diff --git a/interface/web/dns/form/dns_soa.tform.php b/interface/web/dns/form/dns_soa.tform.php index fd41c87..e4237e0 100644 --- a/interface/web/dns/form/dns_soa.tform.php +++ b/interface/web/dns/form/dns_soa.tform.php @@ -95,7 +95,7 @@ 1 => array ( 'type' => 'UNIQUE', 'errmsg'=> 'origin_error_unique'), 2 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-\/]{2,255}\.[a-zA-Z0-9\-]{2,30}[\.]{0,1}$/', + 'regex' => '/^[a-zA-Z0-9\.\-\/]{2,255}\.[a-zA-Z0-9\-]{2,30}[\.]{0,1}$/', 'errmsg'=> 'origin_error_regex'), ), 'default' => '', @@ -115,7 +115,7 @@ 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{1,255}$/', 'errmsg'=> 'ns_error_regex'), ), 'default' => '', @@ -137,7 +137,7 @@ 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'mbox_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[[a-zA-Z0-9\.\-\_]{0,255}\.$/', + 'regex' => '/^[a-zA-Z0-9\.\-\_]{0,255}\.$/', 'errmsg'=> 'mbox_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_srv.tform.php b/interface/web/dns/form/dns_srv.tform.php index b737bbd..368ecbf 100644 --- a/interface/web/dns/form/dns_srv.tform.php +++ b/interface/web/dns/form/dns_srv.tform.php @@ -86,7 +86,7 @@ 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{0,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{0,255}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_txt.tform.php b/interface/web/dns/form/dns_txt.tform.php index 159629b..489c5e8 100644 --- a/interface/web/dns/form/dns_txt.tform.php +++ b/interface/web/dns/form/dns_txt.tform.php @@ -86,7 +86,7 @@ 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{0,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-\_]{0,255}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', diff --git a/interface/web/help/templates/faq_manage_questions_list.htm b/interface/web/help/templates/faq_manage_questions_list.htm index 0fa724c..e7b5eaf 100644 --- a/interface/web/help/templates/faq_manage_questions_list.htm +++ b/interface/web/help/templates/faq_manage_questions_list.htm @@ -25,12 +25,12 @@ <tbody> <tmpl_loop name="records"> <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> - <td>{tmpl_var name='hf_question'}</td> - <td>{tmpl_var name='hf_section'}</td> - <td class="tbl_col_buttons"> + <td width="60%">{tmpl_var name='hf_question'}</td> + <td width="30%">{tmpl_var name='hf_section'}</td> + <td class="tbl_col_buttons" width="5%"> <a class="button icons16 icoDelete" href="javascript: del_record('help/faq_delete.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name="faq_delete_txt"}</span></a> </td> - <td class="tbl_col_buttons"> + <td class="tbl_col_buttons" width="5%"> <a class="button icons16 icoEdit" href="javascript: loadContent('help/faq_edit.php?id={tmpl_var name='id'}');"><span>{tmpl_var name="faq_edit_txt"}</span></a> </td> </tr> diff --git a/interface/web/js/jquery.tipsy.js b/interface/web/js/jquery.tipsy.js index 5e9c694..dcb1bb5 100644 --- a/interface/web/js/jquery.tipsy.js +++ b/interface/web/js/jquery.tipsy.js @@ -1,426 +1,438 @@ -// tipsy, facebook style tooltips for jquery -// version 1.0.0a -// (c) 2008-2010 jason frame [jason@onehackoranother.com] -// released under the MIT license - -(function($) { - - function maybeCall(thing, ctx) { - return (typeof thing == 'function') ? (thing.call(ctx)) : thing; - }; - - function Tipsy(element, options) { - this.$element = $(element); - this.options = options; - this.enabled = true; - this.fixTitle(); - }; - - Tipsy.prototype = { - show: function() { - var title = this.getTitle(); - if (title && this.enabled) { - var $tip = this.tip(); - - $tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title); - $tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity - $tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).prependTo(document.body); - - var pos = $.extend({}, this.$element.offset(), { - width: this.$element[0].offsetWidth, - height: this.$element[0].offsetHeight - }); - - var actualWidth = $tip[0].offsetWidth, - actualHeight = $tip[0].offsetHeight, - gravity = maybeCall(this.options.gravity, this.$element[0]); - - var tp; - switch (gravity.charAt(0)) { - case 'n': - tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; - break; - case 's': - tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; - break; - case 'e': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset}; - break; - case 'w': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset}; - break; - } - - if (gravity.length == 2) { - if (gravity.charAt(1) == 'w') { - tp.left = pos.left + pos.width / 2 - 15; - } else { - tp.left = pos.left + pos.width / 2 - actualWidth + 15; - } - } - - $tip.css(tp).addClass('tipsy-' + gravity); - $tip.find('.tipsy-arrow')[0].className = 'tipsy-arrow tipsy-arrow-' + gravity.charAt(0); - if (this.options.className) { - $tip.addClass(maybeCall(this.options.className, this.$element[0])); - } - - if (this.options.fade) { - $tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity}); - } else { - $tip.css({visibility: 'visible', opacity: this.options.opacity}); - } - } - }, - - hide: function() { - if (this.options.fade) { - this.tip().stop().fadeOut(function() { $(this).remove(); }); - } else { - this.tip().remove(); - } - }, - - fixTitle: function() { - var $e = this.$element; - if ($e.attr('title') || typeof($e.attr('original-title')) != 'string') { - $e.attr('original-title', $e.attr('title') || '').removeAttr('title'); - } - }, - - getTitle: function() { - var title, $e = this.$element, o = this.options; - this.fixTitle(); - var title, o = this.options; - if (typeof o.title == 'string') { - title = $e.attr(o.title == 'title' ? 'original-title' : o.title); - } else if (typeof o.title == 'function') { - title = o.title.call($e[0]); - } - title = ('' + title).replace(/(^\s*|\s*$)/, ""); - return title || o.fallback; - }, - - tip: function() { - if (!this.$tip) { - this.$tip = $('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>'); - } - return this.$tip; - }, - - validate: function() { - if (!this.$element[0].parentNode) { - this.hide(); - this.$element = null; - this.options = null; - } - }, - - enable: function() { this.enabled = true; }, - disable: function() { this.enabled = false; }, - toggleEnabled: function() { this.enabled = !this.enabled; } - }; - - $.fn.tipsy = function(options) { - - if (options === true) { - return this.data('tipsy'); - } else if (typeof options == 'string') { - var tipsy = this.data('tipsy'); - if (tipsy) tipsy[options](); - return this; - } - - options = $.extend({}, $.fn.tipsy.defaults, options); - - function get(ele) { - var tipsy = $.data(ele, 'tipsy'); - if (!tipsy) { - tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options)); - $.data(ele, 'tipsy', tipsy); - } - return tipsy; - } - - function enter() { - var tipsy = get(this); - tipsy.hoverState = 'in'; - if (options.delayIn == 0) { - tipsy.show(); - } else { - tipsy.fixTitle(); - setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn); - } - }; - - function leave() { - var tipsy = get(this); - tipsy.hoverState = 'out'; - if (options.delayOut == 0) { - tipsy.hide(); - } else { - setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut); - } - }; - - if (!options.live) this.each(function() { get(this); }); - - if (options.trigger != 'manual') { - var binder = options.live ? 'live' : 'bind', - eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus', - eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur'; - this[binder](eventIn, enter)[binder](eventOut, leave); - } - - return this; - - }; - - $.fn.tipsy.defaults = { - className: null, - delayIn: 0, - delayOut: 0, - fade: false, - fallback: '', - gravity: 'n', - html: false, - live: false, - offset: 0, - opacity: 0.8, - title: 'title', - trigger: 'hover' - }; - - // Overwrite this method to provide options on a per-element basis. - // For example, you could store the gravity in a 'tipsy-gravity' attribute: - // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' }); - // (remember - do not modify 'options' in place!) - $.fn.tipsy.elementOptions = function(ele, options) { - return $.metadata ? $.extend({}, options, $(ele).metadata()) : options; - }; - - $.fn.tipsy.autoNS = function() { - return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n'; - }; - - $.fn.tipsy.autoWE = function() { - return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w'; - }; - - /** - * yields a closure of the supplied parameters, producing a function that takes - * no arguments and is suitable for use as an autogravity function like so: - * - * @param margin (int) - distance from the viewable region edge that an - * element should be before setting its tooltip's gravity to be away - * from that edge. - * @param prefer (string, e.g. 'n', 'sw', 'w') - the direction to prefer - * if there are no viewable region edges effecting the tooltip's - * gravity. It will try to vary from this minimally, for example, - * if 'sw' is preferred and an element is near the right viewable - * region edge, but not the top edge, it will set the gravity for - * that element's tooltip to be 'se', preserving the southern - * component. - */ - $.fn.tipsy.autoBounds = function(margin, prefer) { - return function() { - var dir = {ns: prefer[0], ew: (prefer.length > 1 ? prefer[1] : false)}, - boundTop = $(document).scrollTop() + margin, - boundLeft = $(document).scrollLeft() + margin, - $this = $(this); - - if ($this.offset().top < boundTop) dir.ns = 'n'; - if ($this.offset().left < boundLeft) dir.ew = 'w'; - if ($(window).width() + $(document).scrollLeft() - $this.offset().left < margin) dir.ew = 'e'; - if ($(window).height() + $(document).scrollTop() - $this.offset().top < margin) dir.ns = 's'; - - return dir.ns + (dir.ew ? dir.ew : ''); - } - }; - -})(jQuery); - - - -(function( $ ) { - $.widget( "ui.combobox", { - _create: function() { - var elwidth = this.element.width(); - var elheight = this.element.height(); - var input, - self = this, - select = this.element, - internal = false, - selected = select.children( ":selected" ), - value = selected.val() ? selected.text() : "", - wrapper = this.wrapper = $( "<span>" ) - .addClass( "ui-combobox" ) - .insertAfter( select ); - - input = $( "<input>" ).css( { "width": (select.is(':visible') ? (elwidth > 15 ? elwidth - 15 : 1) : 350), "height": (elheight > 0 ? elheight : 16) }); - select.hide(); - input.appendTo( wrapper ) - .val( value ) - .addClass( "ui-state-default ui-combobox-input" ) - .autocomplete({ - delay: 0, - minLength: 0, - source: function( request, response ) { - var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" ); - response( select.children( "option" ).map(function() { - var text = $( this ).text(); - //if ( this.value && ( !request.term || matcher.test(text) ) ) - if ( (!request.term || matcher.test(text)) && $(this).css('display') != 'none' ) - return { - label: (text == "" ? " " : text.replace( - new RegExp( - "(?![^&;]+;)(?!<[^<>]*)(" + - $.ui.autocomplete.escapeRegex(request.term) + - ")(?![^<>]*>)(?![^&;]+;)", "gi" - ), "<strong>$1</strong>" )), - 'value': (text ? text : ''), - 'class': (select.hasClass('flags') ? 'country-' + ($(this).val() ? $(this).val().toUpperCase() : '') : $(this).attr('class')), - option: this - }; - }) ); - }, - select: function( event, ui ) { - ui.item.option.selected = true; - self._trigger( "selected", event, { - item: ui.item.option - }); - if((select.onchange || false) && typeof select.onchange == 'function') { - select.onchange( { target: select } ); - } else if($(select).attr('onchange')) { - eval($(select).attr('onchange')); - } else { - if(!ui.item.internal) { - internal = true; - $(select).change(); - } - } - if (jQuery(".panel #Filter").length > 0) { - jQuery(".panel #Filter").trigger('click'); - } - }, - change: function( event, ui ) { - if ( !ui.item ) { - var matcher = new RegExp( "" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "", "i" ), - matchtext = $(this).val(); - valid = false; - select.children( "option" ).each(function() { - if( (($(this).text() == "" && matchtext == "") || $( this ).text().match( matcher )) && $(this).css('display') != 'none' ) { - select.val($(this).val()); - this.selected = valid = true; - return false; - } - }); - if ( !valid ) { - // remove invalid value, as it didn't match anything - $( this ).val( "" ); - select.val( "" ); - input.data( "autocomplete" ).term = ""; - return false; - } - } - } - }) - .keypress(function(event) { - if(event.keyCode == 13) { - event.preventDefault(); - var matcher = new RegExp( "" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "", "i" ), - matchtext = $(this).val(); - valid = false, - selected = false; - select.children( "option" ).each(function() { - if( (($(this).val() == "" && matchtext == "") || $( this ).text().match( matcher )) && $(this).css('display') != 'none' ) { - valid = true; - selected = $(this); - return false; - } - }); - if(!valid) return false; - - $(this).autocomplete('option','select').call($(this), event, { item: { option: selected.get(0), internal: true } }); - } - }) - .addClass( "ui-widget ui-widget-content ui-corner-left" ) - .click(function() { - // close if already visible - if ( input.autocomplete( "widget" ).is( ":visible" ) ) { - //input.autocomplete( "close" ); - return; - } - - // pass empty string as value to search for, displaying all results - input.autocomplete( "search", "" ); - input.focus(); - }); - if(select.hasClass('flags')) input.addClass('flags'); - - input.data( "autocomplete" )._renderItem = function( ul, item ) { - var el = $( "<li></li>" ) - .data( "item.autocomplete", item ) - .append( "<a>" + item.label + "</a>" ) - .appendTo( ul ); - if(item && item['class'] && el) el.addClass(item['class']); - return el; - }; - select.change(function(e) { - if(internal == true) { - internal = false; - return; - } - var matchtext = $(this).val().toLowerCase(); - valid = false, - selected = false, - selected_val = ""; - select.children( "option" ).each(function() { - if( (($(this).val() == "" && matchtext == "") || $( this ).val().toLowerCase() == matchtext) && $(this).css('display') != 'none' ) { - valid = true; - selected = $(this); - selected_val = $(this).text(); - return false; - } - }); - if(!valid) return false; - - input.val(selected_val).autocomplete('option','select').call(input, (e ? e : {target: select}), { item: { option: selected.get(0), internal: true } }); - }); - - $( "<a>" ) - .attr( "tabIndex", -1 ) - .attr( "title", "Show All Items" ) - .appendTo( wrapper ) - .button({ - icons: { - primary: "ui-icon-triangle-1-s" - }, - text: false - }) - .removeClass( "ui-corner-all" ) - .addClass( "ui-corner-right ui-combobox-toggle" ) - .css( { "width": 15, "height": (elheight > 0 ? elheight : 16) }) - .click(function() { - // close if already visible - if ( input.autocomplete( "widget" ).is( ":visible" ) ) { - input.autocomplete( "close" ); - return; - } - - // work around a bug (likely same cause as #5265) - $( this ).blur(); - - // pass empty string as value to search for, displaying all results - input.autocomplete( "search", "" ); - input.focus(); - }); - }, - - destroy: function() { - this.wrapper.remove(); - this.element.show(); - $.Widget.prototype.destroy.call( this ); - } - }); -})( jQuery ); +// tipsy, facebook style tooltips for jquery +// version 1.0.0a +// (c) 2008-2010 jason frame [jason@onehackoranother.com] +// released under the MIT license + +(function($) { + + function maybeCall(thing, ctx) { + return (typeof thing == 'function') ? (thing.call(ctx)) : thing; + }; + + function Tipsy(element, options) { + this.$element = $(element); + this.options = options; + this.enabled = true; + this.fixTitle(); + }; + + Tipsy.prototype = { + show: function() { + var title = this.getTitle(); + if (title && this.enabled) { + var $tip = this.tip(); + + $tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title); + $tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity + $tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).prependTo(document.body); + + var pos = $.extend({}, this.$element.offset(), { + width: this.$element[0].offsetWidth, + height: this.$element[0].offsetHeight + }); + + var actualWidth = $tip[0].offsetWidth, + actualHeight = $tip[0].offsetHeight, + gravity = maybeCall(this.options.gravity, this.$element[0]); + + var tp; + switch (gravity.charAt(0)) { + case 'n': + tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; + break; + case 's': + tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; + break; + case 'e': + tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset}; + break; + case 'w': + tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset}; + break; + } + + if (gravity.length == 2) { + if (gravity.charAt(1) == 'w') { + tp.left = pos.left + pos.width / 2 - 15; + } else { + tp.left = pos.left + pos.width / 2 - actualWidth + 15; + } + } + + $tip.css(tp).addClass('tipsy-' + gravity); + $tip.find('.tipsy-arrow')[0].className = 'tipsy-arrow tipsy-arrow-' + gravity.charAt(0); + if (this.options.className) { + $tip.addClass(maybeCall(this.options.className, this.$element[0])); + } + + if (this.options.fade) { + $tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity}); + } else { + $tip.css({visibility: 'visible', opacity: this.options.opacity}); + } + } + }, + + hide: function() { + if (this.options.fade) { + this.tip().stop().fadeOut(function() { $(this).remove(); }); + } else { + this.tip().remove(); + } + }, + + fixTitle: function() { + var $e = this.$element; + if ($e.attr('title') || typeof($e.attr('original-title')) != 'string') { + $e.attr('original-title', $e.attr('title') || '').removeAttr('title'); + } + }, + + getTitle: function() { + var title, $e = this.$element, o = this.options; + this.fixTitle(); + var title, o = this.options; + if (typeof o.title == 'string') { + title = $e.attr(o.title == 'title' ? 'original-title' : o.title); + } else if (typeof o.title == 'function') { + title = o.title.call($e[0]); + } + title = ('' + title).replace(/(^\s*|\s*$)/, ""); + return title || o.fallback; + }, + + tip: function() { + if (!this.$tip) { + this.$tip = $('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>'); + } + return this.$tip; + }, + + validate: function() { + if (!this.$element[0].parentNode) { + this.hide(); + this.$element = null; + this.options = null; + } + }, + + enable: function() { this.enabled = true; }, + disable: function() { this.enabled = false; }, + toggleEnabled: function() { this.enabled = !this.enabled; } + }; + + $.fn.tipsy = function(options) { + + if (options === true) { + return this.data('tipsy'); + } else if (typeof options == 'string') { + var tipsy = this.data('tipsy'); + if (tipsy) tipsy[options](); + return this; + } + + options = $.extend({}, $.fn.tipsy.defaults, options); + + function get(ele) { + var tipsy = $.data(ele, 'tipsy'); + if (!tipsy) { + tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options)); + $.data(ele, 'tipsy', tipsy); + } + return tipsy; + } + + function enter() { + var tipsy = get(this); + tipsy.hoverState = 'in'; + if (options.delayIn == 0) { + tipsy.show(); + } else { + tipsy.fixTitle(); + setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn); + } + }; + + function leave() { + var tipsy = get(this); + tipsy.hoverState = 'out'; + if (options.delayOut == 0) { + tipsy.hide(); + } else { + setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut); + } + }; + + if (!options.live) this.each(function() { get(this); }); + + if (options.trigger != 'manual') { + var binder = options.live ? 'live' : 'bind', + eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus', + eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur'; + this[binder](eventIn, enter)[binder](eventOut, leave); + } + + return this; + + }; + + $.fn.tipsy.defaults = { + className: null, + delayIn: 0, + delayOut: 0, + fade: false, + fallback: '', + gravity: 'n', + html: false, + live: false, + offset: 0, + opacity: 0.8, + title: 'title', + trigger: 'hover' + }; + + // Overwrite this method to provide options on a per-element basis. + // For example, you could store the gravity in a 'tipsy-gravity' attribute: + // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' }); + // (remember - do not modify 'options' in place!) + $.fn.tipsy.elementOptions = function(ele, options) { + return $.metadata ? $.extend({}, options, $(ele).metadata()) : options; + }; + + $.fn.tipsy.autoNS = function() { + return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n'; + }; + + $.fn.tipsy.autoWE = function() { + return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w'; + }; + + /** + * yields a closure of the supplied parameters, producing a function that takes + * no arguments and is suitable for use as an autogravity function like so: + * + * @param margin (int) - distance from the viewable region edge that an + * element should be before setting its tooltip's gravity to be away + * from that edge. + * @param prefer (string, e.g. 'n', 'sw', 'w') - the direction to prefer + * if there are no viewable region edges effecting the tooltip's + * gravity. It will try to vary from this minimally, for example, + * if 'sw' is preferred and an element is near the right viewable + * region edge, but not the top edge, it will set the gravity for + * that element's tooltip to be 'se', preserving the southern + * component. + */ + $.fn.tipsy.autoBounds = function(margin, prefer) { + return function() { + var dir = {ns: prefer[0], ew: (prefer.length > 1 ? prefer[1] : false)}, + boundTop = $(document).scrollTop() + margin, + boundLeft = $(document).scrollLeft() + margin, + $this = $(this); + + if ($this.offset().top < boundTop) dir.ns = 'n'; + if ($this.offset().left < boundLeft) dir.ew = 'w'; + if ($(window).width() + $(document).scrollLeft() - $this.offset().left < margin) dir.ew = 'e'; + if ($(window).height() + $(document).scrollTop() - $this.offset().top < margin) dir.ns = 's'; + + return dir.ns + (dir.ew ? dir.ew : ''); + } + }; + +})(jQuery); + + + +(function( $ ) { + $.widget( "ui.combobox", { + _create: function() { + var elwidth = this.element.width(); + var elheight = this.element.height(); + var input, + self = this, + select = this.element, + internal = false, + selected = select.children( ":selected" ), + value = selected.val() ? selected.text() : "", + wrapper = this.wrapper = $( "<span>" ) + .addClass( "ui-combobox" ) + .insertAfter( select ); + + input = $( "<input>" ).css( { "width": (select.is(':visible') ? (elwidth > 15 ? elwidth - 15 : 1) : 350), "height": (elheight > 0 ? elheight : 16) }); + select.hide(); + input.appendTo( wrapper ) + .val( value ) + .addClass( "ui-state-default ui-combobox-input" ) + .autocomplete({ + delay: 0, + minLength: 0, + source: function( request, response ) { + var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" ); + response( select.children( "option" ).map(function() { + var text = $( this ).text(); + //if ( this.value && ( !request.term || matcher.test(text) ) ) + if ( (!request.term || matcher.test(text)) && $(this).css('display') != 'none' ) + return { + label: (text == "" ? " " : text.replace( + new RegExp( + "(?![^&;]+;)(?!<[^<>]*)(" + + $.ui.autocomplete.escapeRegex(request.term) + + ")(?![^<>]*>)(?![^&;]+;)", "gi" + ), "<strong>$1</strong>" )), + 'value': (text ? text : ''), + 'class': (select.hasClass('flags') ? 'country-' + ($(this).val() ? $(this).val().toUpperCase() : '') : $(this).attr('class')), + option: this + }; + }) ); + }, + select: function( event, ui ) { + ui.item.option.selected = true; + self._trigger( "selected", event, { + item: ui.item.option + }); + if((select.onchange || false) && typeof select.onchange == 'function') { + select.onchange( { target: select } ); + } else if($(select).attr('onchange')) { + eval($(select).attr('onchange')); + } else { + if(!ui.item.internal) { + internal = true; + $(select).change(); + } + } + if (jQuery(".panel #Filter").length > 0) { + jQuery(".panel #Filter").trigger('click'); + } + }, + change: function( event, ui ) { + if ( !ui.item ) { + var matcher = new RegExp( "" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "", "i" ), + matchtext = $(this).val(); + valid = false; + select.children( "option" ).each(function() { + if( (($(this).text() == "" && matchtext == "") || $( this ).text().match( matcher )) && $(this).css('display') != 'none' ) { + select.val($(this).val()); + this.selected = valid = true; + return false; + } + }); + if ( !valid ) { + // remove invalid value, as it didn't match anything + $( this ).val( "" ); + select.val( "" ); + input.data( "autocomplete" ).term = ""; + return false; + } + } + } + }) + .keypress(function(event) { + if(select.attr('disabled')) { + event.preventDefault(); + return false; + } + if(event.keyCode == 13) { + event.preventDefault(); + var matcher = new RegExp( "" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "", "i" ), + matchtext = $(this).val(); + valid = false, + selected = false; + select.children( "option" ).each(function() { + if( (($(this).val() == "" && matchtext == "") || $( this ).text().match( matcher )) && $(this).css('display') != 'none' ) { + valid = true; + selected = $(this); + return false; + } + }); + if(!valid) return false; + + $(this).autocomplete('option','select').call($(this), event, { item: { option: selected.get(0), internal: true } }); + } + }) + .addClass( "ui-widget ui-widget-content ui-corner-left" ) + .click(function() { + if(select.attr('disabled')) { + event.preventDefault(); + return false; + } + // close if already visible + if ( input.autocomplete( "widget" ).is( ":visible" ) ) { + //input.autocomplete( "close" ); + return; + } + + // pass empty string as value to search for, displaying all results + input.autocomplete( "search", "" ); + input.focus(); + }); + if(select.hasClass('flags')) input.addClass('flags'); + + input.data( "autocomplete" )._renderItem = function( ul, item ) { + var el = $( "<li></li>" ) + .data( "item.autocomplete", item ) + .append( "<a>" + item.label + "</a>" ) + .appendTo( ul ); + if(item && item['class'] && el) el.addClass(item['class']); + return el; + }; + select.change(function(e) { + if(internal == true) { + internal = false; + return; + } + var matchtext = $(this).val().toLowerCase(); + valid = false, + selected = false, + selected_val = ""; + select.children( "option" ).each(function() { + if( (($(this).val() == "" && matchtext == "") || $( this ).val().toLowerCase() == matchtext) && $(this).css('display') != 'none' ) { + valid = true; + selected = $(this); + selected_val = $(this).text(); + return false; + } + }); + if(!valid) return false; + + input.val(selected_val).autocomplete('option','select').call(input, (e ? e : {target: select}), { item: { option: selected.get(0), internal: true } }); + }); + + $( "<a>" ) + .attr( "tabIndex", -1 ) + .attr( "title", "Show All Items" ) + .appendTo( wrapper ) + .button({ + icons: { + primary: "ui-icon-triangle-1-s" + }, + text: false + }) + .removeClass( "ui-corner-all" ) + .addClass( "ui-corner-right ui-combobox-toggle" ) + .css( { "width": 15, "height": (elheight > 0 ? elheight : 16) }) + .click(function() { + if(select.attr('disabled')) { + event.preventDefault(); + return false; + } + // close if already visible + if ( input.autocomplete( "widget" ).is( ":visible" ) ) { + input.autocomplete( "close" ); + return; + } + + // work around a bug (likely same cause as #5265) + $( this ).blur(); + + // pass empty string as value to search for, displaying all results + input.autocomplete( "search", "" ); + input.focus(); + }); + }, + + destroy: function() { + this.wrapper.remove(); + this.element.show(); + $.Widget.prototype.destroy.call( this ); + } + }); +})( jQuery ); diff --git a/interface/web/js/scrigo.js.php b/interface/web/js/scrigo.js.php index 2da73cb..a69b7c2 100644 --- a/interface/web/js/scrigo.js.php +++ b/interface/web/js/scrigo.js.php @@ -123,7 +123,7 @@ reportError('Ajax Request was not successful.'+pagename); } }); - setTimeout( "loadContentRefresh('"+pagename+"&refresh="+document.getElementById('refreshinterval').value+"')", document.getElementById('refreshinterval').value*1000 ); + setTimeout( "loadContentRefresh('"+pagename+"&refresh="+document.getElementById('refreshinterval').value+"')", document.getElementById('refreshinterval').value*1000*60 ); } } diff --git a/interface/web/login/lib/lang/en.lng b/interface/web/login/lib/lang/en.lng index 768eaba..e540ef2 100644 --- a/interface/web/login/lib/lang/en.lng +++ b/interface/web/login/lib/lang/en.lng @@ -7,13 +7,11 @@ $wb['pw_reset'] = 'The password has been reset and send to your email address.'; $wb['pw_error'] = 'Username or email address does not match.'; $wb['pw_error_noinput'] = 'Please enter email address and username.'; - $wb['pw_reset_mail_msg'] = 'The password to your ISPConfig 3 control panel account has been reset. The new password is: '; $wb['pw_reset_mail_title'] = 'ISPConfig 3 Control panel password has been reset.'; - $wb['user_regex_error'] = 'Username contains unallowed characters or is longer than 64 characters.'; $wb['pw_error_length'] = 'The password length is > 64 characters.'; - +$wb['email_error'] = 'Email contains unallowed characters or has a invalid format.'; $wb['login_txt'] = "Login"; $wb['username_txt'] = "Username"; $wb['password_txt'] = "Password"; @@ -23,9 +21,7 @@ $wb['pw_button_txt'] = "Resend password"; $wb['email_txt'] = "Email"; $wb['back_txt'] = 'Back'; - $wb['error_maintenance_mode'] = 'This ISPConfig installation is currently under maintenance. We should be back shortly. Thank you for your patience.'; - $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.'; $wb['stay_logged_in_txt'] = 'Keep me logged in'; ?> \ No newline at end of file diff --git a/interface/web/mail/form/mail_user.tform.php b/interface/web/mail/form/mail_user.tform.php index ce3c195..14e9afe 100644 --- a/interface/web/mail/form/mail_user.tform.php +++ b/interface/web/mail/form/mail_user.tform.php @@ -160,7 +160,7 @@ 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}$/i', + 'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}(,\s*\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,}$/i', 'errmsg'=> 'cc_error_isemail'), ), 'default' => '', diff --git a/interface/web/mail/lib/lang/de_mail_user.lng b/interface/web/mail/lib/lang/de_mail_user.lng index f9f66f6..3ee74a5 100644 --- a/interface/web/mail/lib/lang/de_mail_user.lng +++ b/interface/web/mail/lib/lang/de_mail_user.lng @@ -16,7 +16,7 @@ $wb['server_id_txt'] = 'Server ID'; $wb['password_txt'] = 'Passwort'; $wb['maildir_txt'] = 'E-Mail Verzeichnis'; -$wb['postfix_txt'] = 'Aktiviere Empfang'; +$wb['postfix_txt'] = 'Aktiviere SMTP (in/out)'; $wb['access_txt'] = 'Aktiviere Zugriff'; $wb['policy_txt'] = 'Spamfilter'; $wb['no_policy'] = '- nicht aktiviert -'; @@ -54,5 +54,5 @@ $wb['daily_backup_txt'] = 'taeglich'; $wb['weekly_backup_txt'] = 'woechentlich'; $wb['monthly_backup_txt'] = 'monatlich'; - +$wb['cc_note_txt'] = '(Mehrere E-Mail-Adressen mit Kommas trennen)'; ?> diff --git a/interface/web/mail/lib/lang/en_mail_user.lng b/interface/web/mail/lib/lang/en_mail_user.lng index fd2b110..389dad0 100644 --- a/interface/web/mail/lib/lang/en_mail_user.lng +++ b/interface/web/mail/lib/lang/en_mail_user.lng @@ -21,7 +21,7 @@ $wb["server_id_txt"] = 'Aerver_id'; $wb["password_txt"] = 'Password'; $wb["maildir_txt"] = 'Maildir'; -$wb["postfix_txt"] = 'Enable Receiving'; +$wb["postfix_txt"] = 'Enable SMTP (in/out)'; $wb["access_txt"] = 'Enable Access'; $wb["policy_txt"] = 'Spamfilter'; $wb["no_policy"] = '- not enabled -'; @@ -54,4 +54,5 @@ $wb['weekly_backup_txt'] = 'Weekly'; $wb['monthly_backup_txt'] = 'Monthly'; $wb['email_error_isascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.'; +$wb['cc_note_txt'] = '(Separate multiple email addresses with commas)'; ?> diff --git a/interface/web/mail/templates/mail_mailinglist_edit.htm b/interface/web/mail/templates/mail_mailinglist_edit.htm index 6a37951..d9ec0ca 100644 --- a/interface/web/mail/templates/mail_mailinglist_edit.htm +++ b/interface/web/mail/templates/mail_mailinglist_edit.htm @@ -60,7 +60,7 @@ </tmpl_if> <div class="ctrlHolder"> <label for="password">{tmpl_var name='password_txt'}</label> - <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> + <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> </div> <div class="ctrlHolder"> <p class="label">{tmpl_var name='password_strength_txt'}</p> @@ -69,7 +69,7 @@ </div> <div class="ctrlHolder"> <label for="repeat_password">{tmpl_var name='repeat_password_txt'}</label> - <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" onkeyup="checkPassMatch('password','repeat_password');" /> + <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" autocomplete="off" onkeyup="checkPassMatch('password','repeat_password');" /> </div> <div id="confirmpasswordError" style="display:none;" class="confirmpassworderror">{tmpl_var name='password_mismatch_txt'}</div> <div id="confirmpasswordOK" style="display:none;" class="confirmpasswordok">{tmpl_var name='password_match_txt'}</div> diff --git a/interface/web/mail/templates/mail_user_mailbox_edit.htm b/interface/web/mail/templates/mail_user_mailbox_edit.htm index 2647e24..f946502 100644 --- a/interface/web/mail/templates/mail_user_mailbox_edit.htm +++ b/interface/web/mail/templates/mail_user_mailbox_edit.htm @@ -23,7 +23,7 @@ </div></tmpl_if> <div class="ctrlHolder"> <label for="password">{tmpl_var name='password_txt'}</label> - <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> + <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> </div> <div class="ctrlHolder"> <p class="label">{tmpl_var name='password_strength_txt'}</p> @@ -32,7 +32,7 @@ </div> <div class="ctrlHolder"> <label for="repeat_password">{tmpl_var name='repeat_password_txt'}</label> - <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" onkeyup="checkPassMatch('password','repeat_password');" /> + <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" autocomplete="off" onkeyup="checkPassMatch('password','repeat_password');" /> </div> <div id="confirmpasswordError" style="display:none;" class="confirmpassworderror">{tmpl_var name='password_mismatch_txt'}</div> <div id="confirmpasswordOK" style="display:none;" class="confirmpasswordok">{tmpl_var name='password_match_txt'}</div> @@ -42,7 +42,7 @@ </div> <div class="ctrlHolder"> <label for="name">{tmpl_var name='cc_txt'}</label> - <input name="cc" id="cc" value="{tmpl_var name='cc'}" size="30" maxlength="255" type="text" class="textInput" /> {tmpl_var name='name_optional_txt'} + <input name="cc" id="cc" value="{tmpl_var name='cc'}" size="30" maxlength="255" type="text" class="textInput" /> {tmpl_var name='name_optional_txt'} {tmpl_var name='cc_note_txt'} </div> <div class="ctrlHolder"> <label for="policy">{tmpl_var name='policy_txt'}</label> diff --git a/interface/web/mailuser/form/mail_user_cc.tform.php b/interface/web/mailuser/form/mail_user_cc.tform.php index 6458bb7..5f1d9ef 100644 --- a/interface/web/mailuser/form/mail_user_cc.tform.php +++ b/interface/web/mailuser/form/mail_user_cc.tform.php @@ -69,7 +69,8 @@ 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-z\-]{2,10}){0,1}$/i', + //'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-z\-]{2,10}){0,1}$/i', + 'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}(,\s*\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,}$/i', 'errmsg'=> 'cc_error_isemail'), ), 'default' => '', diff --git a/interface/web/mailuser/lib/lang/de_mail_user_cc.lng b/interface/web/mailuser/lib/lang/de_mail_user_cc.lng index b85077e..e43d39c 100644 --- a/interface/web/mailuser/lib/lang/de_mail_user_cc.lng +++ b/interface/web/mailuser/lib/lang/de_mail_user_cc.lng @@ -4,4 +4,6 @@ $wb['email_txt'] = 'E-Mail'; $wb['cc_error_isemail'] = 'E-Mail Adresse ungültig im -Kopie senden an- Feld'; $wb['email_is_cc_error'] = 'E-Mail Adresse und '; +$wb['name_optional_txt'] = '(optional)'; +$wb['cc_note_txt'] = '(Mehrere E-Mail-Adressen mit Kommas trennen)'; ?> diff --git a/interface/web/mailuser/lib/lang/en_mail_user_cc.lng b/interface/web/mailuser/lib/lang/en_mail_user_cc.lng index 0073c71..3437d50 100644 --- a/interface/web/mailuser/lib/lang/en_mail_user_cc.lng +++ b/interface/web/mailuser/lib/lang/en_mail_user_cc.lng @@ -4,4 +4,6 @@ $wb["email_txt"] = 'Email'; $wb["cc_error_isemail"] = 'Email address invalid in -Send copy to- field'; $wb["email_is_cc_error"] = 'Email address and send copy to address can not be the same.'; +$wb["name_optional_txt"] = '(Optional)'; +$wb['cc_note_txt'] = '(Separate multiple email addresses with commas)'; ?> \ No newline at end of file diff --git a/interface/web/mailuser/mail_user_spamfilter_edit.php b/interface/web/mailuser/mail_user_spamfilter_edit.php index dfc397d..3ea2aa5 100644 --- a/interface/web/mailuser/mail_user_spamfilter_edit.php +++ b/interface/web/mailuser/mail_user_spamfilter_edit.php @@ -51,7 +51,8 @@ class page_action extends tform_actions { function onShow() { - + global $app; + $this->id = $app->functions->intval($_SESSION['s']['user']['mailuser_id']); parent::onShow(); diff --git a/interface/web/mailuser/templates/mail_user_cc_edit.htm b/interface/web/mailuser/templates/mail_user_cc_edit.htm index ba715c8..3b82c46 100644 --- a/interface/web/mailuser/templates/mail_user_cc_edit.htm +++ b/interface/web/mailuser/templates/mail_user_cc_edit.htm @@ -11,7 +11,7 @@ </div> <div class="ctrlHolder"> <label for="name">{tmpl_var name='cc_txt'}</label> - <input name="cc" id="cc" value="{tmpl_var name='cc'}" size="30" maxlength="255" type="text" class="textInput" /> {tmpl_var name='name_optional_txt'} + <input name="cc" id="cc" value="{tmpl_var name='cc'}" size="30" maxlength="255" type="text" class="textInput" /> {tmpl_var name='name_optional_txt'} {tmpl_var name='cc_note_txt'} </div> </fieldset> diff --git a/interface/web/mailuser/templates/mail_user_password_edit.htm b/interface/web/mailuser/templates/mail_user_password_edit.htm index 01d1227..b28d3a3 100644 --- a/interface/web/mailuser/templates/mail_user_password_edit.htm +++ b/interface/web/mailuser/templates/mail_user_password_edit.htm @@ -11,7 +11,7 @@ </div> <div class="ctrlHolder"> <label for="password">{tmpl_var name='password_txt'}</label> - <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> + <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> </div> <div class="ctrlHolder"> <p class="label">{tmpl_var name='password_strength_txt'}</p> @@ -20,7 +20,7 @@ </div> <div class="ctrlHolder"> <label for="repeat_password">{tmpl_var name='repeat_password_txt'}</label> - <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" onkeyup="checkPassMatch('password','repeat_password');" /> + <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" autocomplete="off" onkeyup="checkPassMatch('password','repeat_password');" /> </div> <div id="confirmpasswordError" style="display:none;" class="confirmpassworderror">{tmpl_var name='password_mismatch_txt'}</div> <div id="confirmpasswordOK" style="display:none;" class="confirmpasswordok">{tmpl_var name='password_match_txt'}</div> diff --git a/interface/web/sites/aps_install_package.php b/interface/web/sites/aps_install_package.php index 2e2e7bc..5d62322 100644 --- a/interface/web/sites/aps_install_package.php +++ b/interface/web/sites/aps_install_package.php @@ -86,7 +86,7 @@ $domains = array(); $domain_for_user = ''; if(!$adminflag) $domain_for_user = "AND (sys_userid = '".$app->db->quote($_SESSION['s']['user']['userid'])."' - OR sys_groupid = '".$app->db->quote($_SESSION['s']['user']['userid'])."' )"; + OR sys_groupid = '".$app->db->quote($_SESSION['s']['user']['default_group'])."' )"; $domains_assoc = $app->db->queryAllRecords("SELECT domain FROM web_domain WHERE document_root != '' AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND active = 'y' ".$domain_for_user." ORDER BY domain;"); if(!empty($domains_assoc)) foreach($domains_assoc as $domain) $domains[] = $domain['domain']; diff --git a/interface/web/sites/lib/lang/en_web_vhost_domain.lng b/interface/web/sites/lib/lang/en_web_vhost_domain.lng index 9f410e0..4caad66 100644 --- a/interface/web/sites/lib/lang/en_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/en_web_vhost_domain.lng @@ -132,5 +132,5 @@ $wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.'; $wb['host_txt'] = 'Hostname'; $wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.'; - +$wb['subdomain_error_empty'] = 'The subdommain field is empty or contains invalid characters.'; ?> diff --git a/interface/web/sites/shell_user_edit.php b/interface/web/sites/shell_user_edit.php index 5a54b33..3c72a5f 100644 --- a/interface/web/sites/shell_user_edit.php +++ b/interface/web/sites/shell_user_edit.php @@ -169,7 +169,6 @@ $sql = "UPDATE shell_user SET server_id = $server_id, dir = '$dir', puser = '$uid', pgroup = '$gid', sys_groupid = '$sys_groupid' WHERE shell_user_id = ".$this->id; $app->db->query($sql); - die($sql); } diff --git a/interface/web/sites/templates/database_user_edit.htm b/interface/web/sites/templates/database_user_edit.htm index 0d42647..9bcf886 100644 --- a/interface/web/sites/templates/database_user_edit.htm +++ b/interface/web/sites/templates/database_user_edit.htm @@ -28,7 +28,7 @@ </div> <div class="ctrlHolder"> <label for="database_password">{tmpl_var name='database_password_txt'}</label> - <input name="database_password" id="database_password" value="{tmpl_var name='database_password'}" size="30" maxlength="255" type="password" class="textInput formLengthHalf" onkeyup="pass_check(this.value);checkPassMatch('database_password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('database_password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> + <input name="database_password" id="database_password" value="{tmpl_var name='database_password'}" size="30" maxlength="255" type="password" class="textInput formLengthHalf" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('database_password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('database_password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> </div> <div class="ctrlHolder"> <p class="label">{tmpl_var name='password_strength_txt'}</p> @@ -37,7 +37,7 @@ </div> <div class="ctrlHolder"> <label for="repeat_password">{tmpl_var name='repeat_password_txt'}</label> - <input name="repeat_password" id="repeat_password" value="" size="30" maxlength="100" type="password" class="textInput formLengthHalf" onkeyup="checkPassMatch('database_password','repeat_password');" /> + <input name="repeat_password" id="repeat_password" value="" size="30" maxlength="100" type="password" class="textInput formLengthHalf" autocomplete="off" onkeyup="checkPassMatch('database_password','repeat_password');" /> </div> <div id="confirmpasswordError" style="display:none;" class="confirmpassworderror">{tmpl_var name='password_mismatch_txt'}</div> <div id="confirmpasswordOK" style="display:none;" class="confirmpasswordok">{tmpl_var name='password_match_txt'}</div> diff --git a/interface/web/sites/templates/ftp_user_edit.htm b/interface/web/sites/templates/ftp_user_edit.htm index c334011..24a0dc3 100644 --- a/interface/web/sites/templates/ftp_user_edit.htm +++ b/interface/web/sites/templates/ftp_user_edit.htm @@ -18,7 +18,7 @@ </div> <div class="ctrlHolder"> <label for="password">{tmpl_var name='password_txt'}</label> - <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> + <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> </div> <div class="ctrlHolder"> <p class="label">{tmpl_var name='password_strength_txt'}</p> @@ -27,7 +27,7 @@ </div> <div class="ctrlHolder"> <label for="repeat_password">{tmpl_var name='repeat_password_txt'}</label> - <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" onkeyup="checkPassMatch('password','repeat_password');" /> + <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" autocomplete="off" onkeyup="checkPassMatch('password','repeat_password');" /> </div> <div id="confirmpasswordError" style="display:none;" class="confirmpassworderror">{tmpl_var name='password_mismatch_txt'}</div> <div id="confirmpasswordOK" style="display:none;" class="confirmpasswordok">{tmpl_var name='password_match_txt'}</div> diff --git a/interface/web/sites/templates/shell_user_edit.htm b/interface/web/sites/templates/shell_user_edit.htm index 1aa663b..364b05e 100644 --- a/interface/web/sites/templates/shell_user_edit.htm +++ b/interface/web/sites/templates/shell_user_edit.htm @@ -26,7 +26,7 @@ </div> <div class="ctrlHolder"> <label for="password">{tmpl_var name='password_txt'}</label> - <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');"/> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> + <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');"/> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> </div> <div class="ctrlHolder"> <p class="label">{tmpl_var name='password_strength_txt'}</p> @@ -35,7 +35,7 @@ </div> <div class="ctrlHolder"> <label for="repeat_password">{tmpl_var name='repeat_password_txt'}</label> - <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" onkeyup="checkPassMatch('password','repeat_password');" /> + <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" autocomplete="off" onkeyup="checkPassMatch('password','repeat_password');" /> </div> <div id="confirmpasswordError" style="display:none;" class="confirmpassworderror">{tmpl_var name='password_mismatch_txt'}</div> <div id="confirmpasswordOK" style="display:none;" class="confirmpasswordok">{tmpl_var name='password_match_txt'}</div> diff --git a/interface/web/sites/templates/web_folder_user_edit.htm b/interface/web/sites/templates/web_folder_user_edit.htm index bb62913..7defdde 100644 --- a/interface/web/sites/templates/web_folder_user_edit.htm +++ b/interface/web/sites/templates/web_folder_user_edit.htm @@ -17,7 +17,7 @@ </div> <div class="ctrlHolder"> <label for="password">{tmpl_var name='password_txt'}</label> - <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> + <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> </div> <div class="ctrlHolder"> <p class="label">{tmpl_var name='password_strength_txt'}</p> @@ -26,7 +26,7 @@ </div> <div class="ctrlHolder"> <label for="repeat_password">{tmpl_var name='repeat_password_txt'}</label> - <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" onkeyup="checkPassMatch('password','repeat_password');" /> + <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" autocomplete="off" onkeyup="checkPassMatch('password','repeat_password');" /> </div> <div id="confirmpasswordError" style="display:none;" class="confirmpassworderror">{tmpl_var name='password_mismatch_txt'}</div> <div id="confirmpasswordOK" style="display:none;" class="confirmpasswordok">{tmpl_var name='password_match_txt'}</div> diff --git a/interface/web/sites/templates/web_vhost_domain_advanced.htm b/interface/web/sites/templates/web_vhost_domain_advanced.htm index 2b680db..d2c3bb8 100644 --- a/interface/web/sites/templates/web_vhost_domain_advanced.htm +++ b/interface/web/sites/templates/web_vhost_domain_advanced.htm @@ -88,7 +88,7 @@ </div> <div class="ctrlHolder apache"> <label for="apache_directives">{tmpl_var name='apache_directives_txt'}</label> - <textarea name="apache_directives" id="apache_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='apache_directives'}</textarea> <b>{tmpl_var name="available_apache_directive_snippets_txt"}</b><br><br> {tmpl_var name="apache_directive_snippets_txt"} + <textarea name="apache_directives" id="apache_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='apache_directives'}</textarea> <b>{tmpl_var name="available_apache_directive_snippets_txt"}</b><br><br> {tmpl_var name="apache_directive_snippets_txt"}<br>----<br><b> {tmpl_var name='variables_txt'}:</b> <a href="javascript:void(0);" class="addPlaceholder">{DOCROOT}</a> </div> <div class="ctrlHolder nginx"> <label for="nginx_directives">{tmpl_var name='nginx_directives_txt'}</label> diff --git a/interface/web/sites/templates/webdav_user_edit.htm b/interface/web/sites/templates/webdav_user_edit.htm index 9a75015..c0f658b 100644 --- a/interface/web/sites/templates/webdav_user_edit.htm +++ b/interface/web/sites/templates/webdav_user_edit.htm @@ -26,7 +26,7 @@ </div> <div class="ctrlHolder"> <label for="password">{tmpl_var name='password_txt'}</label> - <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');"/> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> + <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');"/> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> </div> <div class="ctrlHolder"> <p class="label">{tmpl_var name='password_strength_txt'}</p> @@ -35,7 +35,7 @@ </div> <div class="ctrlHolder"> <label for="repeat_password">{tmpl_var name='repeat_password_txt'}</label> - <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" onkeyup="checkPassMatch('password','repeat_password');" /> + <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" autocomplete="off" onkeyup="checkPassMatch('password','repeat_password');" /> </div> <div id="confirmpasswordError" style="display:none;" class="confirmpassworderror">{tmpl_var name='password_mismatch_txt'}</div> <div id="confirmpasswordOK" style="display:none;" class="confirmpasswordok">{tmpl_var name='password_match_txt'}</div> diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index b671c33..bd020df 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -719,6 +719,14 @@ /* check if the domain module is used - and check if the selected domain can be used! */ if($app->tform->getCurrentTab() == 'domain') { + if($this->_vhostdomain_type == 'subdomain') { + // Check that domain (the subdomain part) is not empty + if(!preg_match('/^[a-zA-Z0-9].*/',$this->dataRecord['domain'])) { + $app->tform->errorMessage .= $app->tform->lng("subdomain_error_empty")."<br />"; + } + } + + /* check if the domain module is used - and check if the selected domain can be used! */ $app->uses('ini_parser,getconf'); $settings = $app->getconf->get_global_config('domains'); if ($settings['use_domain_module'] == 'y') { @@ -769,15 +777,15 @@ $client['web_servers_ids'] = explode(',', $client['web_servers']); - if($client['limit_cgi'] != 'y') $this->dataRecord['cgi'] = '-'; - if($client['limit_ssi'] != 'y') $this->dataRecord['ssi'] = '-'; - if($client['limit_perl'] != 'y') $this->dataRecord['perl'] = '-'; - if($client['limit_ruby'] != 'y') $this->dataRecord['ruby'] = '-'; - if($client['limit_python'] != 'y') $this->dataRecord['python'] = '-'; + if($client['limit_cgi'] != 'y') $this->dataRecord['cgi'] = 'n'; + if($client['limit_ssi'] != 'y') $this->dataRecord['ssi'] = 'n'; + if($client['limit_perl'] != 'y') $this->dataRecord['perl'] = 'n'; + if($client['limit_ruby'] != 'y') $this->dataRecord['ruby'] = 'n'; + if($client['limit_python'] != 'y') $this->dataRecord['python'] = 'n'; if($client['force_suexec'] == 'y') $this->dataRecord['suexec'] = 'y'; - if($client['limit_hterror'] != 'y') $this->dataRecord['errordocs'] = '-'; - if($client['limit_wildcard'] != 'y' && $this->dataRecord['subdomain'] == '*') $this->dataRecord['subdomain'] = '-'; - if($client['limit_ssl'] != 'y') $this->dataRecord['ssl'] = '-'; + if($client['limit_hterror'] != 'y') $this->dataRecord['errordocs'] = 'n'; + if($client['limit_wildcard'] != 'y' && $this->dataRecord['subdomain'] == '*') $this->dataRecord['subdomain'] = 'n'; + if($client['limit_ssl'] != 'y') $this->dataRecord['ssl'] = 'n'; // only generate quota and traffic warnings if value has changed if($this->id > 0) { @@ -867,15 +875,15 @@ $this->dataRecord['web_folder'] = $tmp['web_folder']; // cannot be changed! // set the settings to current if not provided (or cleared due to limits) - if($this->dataRecord['cgi'] == '-') $this->dataRecord['cgi'] = $tmp['cgi']; - if($this->dataRecord['ssi'] == '-') $this->dataRecord['ssi'] = $tmp['ssi']; - if($this->dataRecord['perl'] == '-') $this->dataRecord['perl'] = $tmp['perl']; - if($this->dataRecord['ruby'] == '-') $this->dataRecord['ruby'] = $tmp['ruby']; - if($this->dataRecord['python'] == '-') $this->dataRecord['python'] = $tmp['python']; - if($this->dataRecord['suexec'] == '-') $this->dataRecord['suexec'] = $tmp['suexec']; - if($this->dataRecord['errordocs'] == '-') $this->dataRecord['errordocs'] = $tmp['errordocs']; - if($this->dataRecord['subdomain'] == '-') $this->dataRecord['subdomain'] = $tmp['subdomain']; - if($this->dataRecord['ssl'] == '-') $this->dataRecord['ssl'] = $tmp['ssl']; + if($this->dataRecord['cgi'] == 'n') $this->dataRecord['cgi'] = $tmp['cgi']; + if($this->dataRecord['ssi'] == 'n') $this->dataRecord['ssi'] = $tmp['ssi']; + if($this->dataRecord['perl'] == 'n') $this->dataRecord['perl'] = $tmp['perl']; + if($this->dataRecord['ruby'] == 'n') $this->dataRecord['ruby'] = $tmp['ruby']; + if($this->dataRecord['python'] == 'n') $this->dataRecord['python'] = $tmp['python']; + if($this->dataRecord['suexec'] == 'n') $this->dataRecord['suexec'] = $tmp['suexec']; + if($this->dataRecord['errordocs'] == 'n') $this->dataRecord['errordocs'] = $tmp['errordocs']; + if($this->dataRecord['subdomain'] == 'n') $this->dataRecord['subdomain'] = $tmp['subdomain']; + if($this->dataRecord['ssl'] == 'n') $this->dataRecord['ssl'] = $tmp['ssl']; unset($tmp); // When the record is inserted @@ -1120,7 +1128,6 @@ } } - } $page = new page_action; diff --git a/interface/web/tools/lib/lang/de_resync.lng b/interface/web/tools/lib/lang/de_resync.lng index d18f2ff..8461f20 100644 --- a/interface/web/tools/lib/lang/de_resync.lng +++ b/interface/web/tools/lib/lang/de_resync.lng @@ -9,6 +9,7 @@ $wb['resync_mailbox_txt'] = 'E-Mail Konten'; $wb['resync_dkim_txt'] = 'DKIM-Keys'; $wb['resync_dns_txt'] = 'DNS Einträge'; +$wb['resync_client_txt'] = 'Kunden'; $wb['btn_start_txt'] = 'Start'; $wb['btn_cancel_txt'] = 'Zurück'; ?> diff --git a/interface/web/tools/templates/user_settings.htm b/interface/web/tools/templates/user_settings.htm index 27be28c..d6f57d0 100644 --- a/interface/web/tools/templates/user_settings.htm +++ b/interface/web/tools/templates/user_settings.htm @@ -7,7 +7,7 @@ <fieldset class="inlineLabels"> <div class="ctrlHolder"> <label for="passwort">{tmpl_var name='passwort_txt'}</label> - <input name="passwort" id="passwort" value="{tmpl_var name='passwort'}" size="15" maxlength="100" type="password" class="textInput" onkeyup="pass_check(this.value);checkPassMatch('passwort','repeat_password');"/> <a href="javascript:void(0);" onclick="generatePassword('passwort','repeat_password');">{tmpl_var name='generate_password_txt'}</a> + <input name="passwort" id="passwort" value="{tmpl_var name='passwort'}" size="15" maxlength="100" type="password" class="textInput" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('passwort','repeat_password');"/> <a href="javascript:void(0);" onclick="generatePassword('passwort','repeat_password');">{tmpl_var name='generate_password_txt'}</a> </div> <div class="ctrlHolder"> <p class="label">{tmpl_var name='password_strength_txt'}</p> @@ -16,7 +16,7 @@ </div> <div class="ctrlHolder"> <label for="repeat_password">{tmpl_var name='repeat_password_txt'}</label> - <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" onkeyup="checkPassMatch('passwort','repeat_password');" /> + <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" autocomplete="off" onkeyup="checkPassMatch('passwort','repeat_password');" /> </div> <div id="confirmpasswordError" style="display:none;" class="confirmpassworderror">{tmpl_var name='password_mismatch_txt'}</div> <div id="confirmpasswordOK" style="display:none;" class="confirmpasswordok">{tmpl_var name='password_match_txt'}</div> diff --git a/remoting_client/API-docs/sites_database_add.html b/remoting_client/API-docs/sites_database_add.html index 411f75d..acf53e7 100644 --- a/remoting_client/API-docs/sites_database_add.html +++ b/remoting_client/API-docs/sites_database_add.html @@ -20,6 +20,7 @@ <p class="margin"> <span class="var">$session_id</span>, <span class="var">$client_id</span>, <span class="var">$params</span></p> <p class="headgrp">Parameters (in <span class="var">$params</span>): </p> <p class="margin"> server_id (<span class="paratype">int(11)</span>)</p> +<p class="margin"> website_id (<span class="paratype">int(11)</span>)</p> <p class="margin"> type (<span class="paratype">varchar(16)</span>)</p> <p class="margin"> database_name (<span class="paratype">varchar(64)</span>)</p> <p class="margin"> database_user_id (<span class="paratype">int(11)</span>)</p> diff --git a/remoting_client/API-docs/sites_web_aliasdomain_update.html b/remoting_client/API-docs/sites_web_aliasdomain_update.html index a402594..53daaa2 100644 --- a/remoting_client/API-docs/sites_web_aliasdomain_update.html +++ b/remoting_client/API-docs/sites_web_aliasdomain_update.html @@ -47,6 +47,7 @@ <p class="margin"> ssl_organisation_unit (<span class="paratype">varchar(255)</span>)</p> <p class="margin"> ssl_country (<span class="paratype">varchar(255)</span>)</p> <p class="margin"> ssl_domain (<span class="paratype">varchar(255)</span>)</p> +<p class="margin"> ssl_key (<span class="paratype">mediumtext</span>)</p> <p class="margin"> ssl_request (<span class="paratype">mediumtext</span>)</p> <p class="margin"> ssl_cert (<span class="paratype">mediumtext</span>)</p> <p class="margin"> ssl_bundle (<span class="paratype">mediumtext</span>)</p> diff --git a/remoting_client/API-docs/sites_web_domain_add.html b/remoting_client/API-docs/sites_web_domain_add.html index de47806..02704b6 100644 --- a/remoting_client/API-docs/sites_web_domain_add.html +++ b/remoting_client/API-docs/sites_web_domain_add.html @@ -47,6 +47,7 @@ <p class="margin"> ssl_organisation_unit (<span class="paratype">varchar(255)</span>)</p> <p class="margin"> ssl_country (<span class="paratype">varchar(255)</span>)</p> <p class="margin"> ssl_domain (<span class="paratype">varchar(255)</span>)</p> +<p class="margin"> ssl_key (<span class="paratype">mediumtext</span>)</p> <p class="margin"> ssl_request (<span class="paratype">mediumtext</span>)</p> <p class="margin"> ssl_cert (<span class="paratype">mediumtext</span>)</p> <p class="margin"> ssl_bundle (<span class="paratype">mediumtext</span>)</p> diff --git a/remoting_client/examples/sites_database_add.php b/remoting_client/examples/sites_database_add.php index c391867..3c82776 100644 --- a/remoting_client/examples/sites_database_add.php +++ b/remoting_client/examples/sites_database_add.php @@ -19,6 +19,7 @@ $params = array( 'server_id' => 1, 'type' => 'mysql', + 'website_id' => 1, 'database_name' => 'db_name2', 'database_user_id' => '1', 'database_ro_user_id' => '0', diff --git a/remoting_client/examples/sites_web_domain_add.php b/remoting_client/examples/sites_web_domain_add.php index fa08aa6..b8010e2 100644 --- a/remoting_client/examples/sites_web_domain_add.php +++ b/remoting_client/examples/sites_web_domain_add.php @@ -44,6 +44,7 @@ 'ssl_country' => '', 'ssl_domain' => '', 'ssl_request' => '', + 'ssl_key' => '', 'ssl_cert' => '', 'ssl_bundle' => '', 'ssl_action' => '', @@ -52,6 +53,8 @@ 'allow_override' => 'All', 'apache_directives' => '', 'php_open_basedir' => '/', + 'pm_max_requests' => 0, + 'pm_process_idle_timeout' => 10, 'custom_php_ini' => '', 'backup_interval' => '', 'backup_copies' => 1, diff --git a/server/conf/php-fcgi-starter.master b/server/conf/php-fcgi-starter.master index 97a1628..ea02581 100644 --- a/server/conf/php-fcgi-starter.master +++ b/server/conf/php-fcgi-starter.master @@ -13,4 +13,5 @@ <tmpl_if name="security_level" op="==" value="20"> -d open_basedir="<tmpl_var name='open_basedir'>" \ -d upload_tmp_dir=<tmpl_var name='document_root'>/tmp \ -d session.save_path=<tmpl_var name='document_root'>/tmp \ +-d sendmail_path="/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>" \ </tmpl_if> $1 \ No newline at end of file diff --git a/server/conf/php_fpm_pool.conf.master b/server/conf/php_fpm_pool.conf.master index b8fce17..37edbb7 100644 --- a/server/conf/php_fpm_pool.conf.master +++ b/server/conf/php_fpm_pool.conf.master @@ -32,6 +32,7 @@ <tmpl_var name='enable_php_open_basedir'>php_admin_value[open_basedir] = <tmpl_var name='php_open_basedir'> php_admin_value[session.save_path] = <tmpl_var name='document_root'>/tmp php_admin_value[upload_tmp_dir] = <tmpl_var name='document_root'>/tmp +php_admin_value[sendmail_path] = "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>" </tmpl_if> <tmpl_loop name="custom_php_ini_settings"> diff --git a/server/conf/sieve_filter.master b/server/conf/sieve_filter.master index 09d7fa9..e161a9f 100644 --- a/server/conf/sieve_filter.master +++ b/server/conf/sieve_filter.master @@ -2,7 +2,9 @@ <tmpl_if name="cc"> # Send a copy of email to -redirect "<tmpl_var name='cc'>"; +<tmpl_loop name="ccloop"> +redirect "<tmpl_var name='address'>"; +</tmpl_loop> </tmpl_if> <tmpl_if name="move_junk" op="==" value="y"> diff --git a/server/conf/sieve_filter_1.2.master b/server/conf/sieve_filter_1.2.master index a88dc2d..08473e6 100644 --- a/server/conf/sieve_filter_1.2.master +++ b/server/conf/sieve_filter_1.2.master @@ -2,7 +2,9 @@ <tmpl_if name="cc"> # Send a copy of email to -redirect "<tmpl_var name='cc'>"; +<tmpl_loop name="ccloop"> +redirect "<tmpl_var name='address'>"; +</tmpl_loop> </tmpl_if> <tmpl_if name="move_junk" op="==" value="y"> diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index 035f3a5..271d3fd 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -142,6 +142,11 @@ PerlOptions +ParseHeaders Options +ExecCGI </Directory> + <Directory {tmpl_var name='web_document_root'}> + PerlResponseHandler ModPerl::Registry + PerlOptions +ParseHeaders + Options +ExecCGI + </Directory> <Files *.pl> SetHandler perl-script </Files> @@ -179,7 +184,7 @@ </IfModule> </tmpl_if> # Clear PHP settings of this website - <FilesMatch "\.ph(p3?|tml)$"> + <FilesMatch ".+\.ph(p[345]?|t|tml)$"> SetHandler None </FilesMatch> <tmpl_if name='php' op='==' value='mod'> @@ -231,7 +236,7 @@ # FcgidMaxProcesses 1000 FcgidMaxRequestsPerProcess <tmpl_var name='fastcgi_max_requests'> FcgidMinProcessesPerClass 0 - FcgidMaxProcessesPerClass 100 + FcgidMaxProcessesPerClass 10 FcgidConnectTimeout 3 FcgidIOTimeout 600 FcgidBusyTimeout 3600 @@ -250,6 +255,9 @@ <Directory {tmpl_var name='web_document_root_www'}> AddHandler fcgid-script .php .php3 .php4 .php5 FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php + FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php3 + FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php4 + FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php5 Options +ExecCGI AllowOverride <tmpl_var name='allow_override'> <tmpl_if name='apache_version' op='>' value='2.2' format='version'> @@ -262,6 +270,9 @@ <Directory {tmpl_var name='web_document_root'}> AddHandler fcgid-script .php .php3 .php4 .php5 FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php + FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php3 + FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php4 + FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php5 Options +ExecCGI AllowOverride <tmpl_var name='allow_override'> <tmpl_if name='apache_version' op='>' value='2.2' format='version'> @@ -282,7 +293,7 @@ Allow from all </tmpl_if> </Directory> - AddHandler php5-fcgi .php + AddHandler php5-fcgi .php .php3 .php4 .php5 Action php5-fcgi /php5-fcgi Alias /php5-fcgi {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} <tmpl_if name='use_tcp'> @@ -308,6 +319,7 @@ RewriteCond %{HTTP_HOST} <tmpl_var name='rewrite_domain'>$ [NC] <tmpl_if name="rewrite_is_url" op="==" value="n"> RewriteCond %{REQUEST_URI} !^/webdav/ + RewriteCond %{REQUEST_URI} !^/php5-fcgi/ RewriteCond %{REQUEST_URI} !^<tmpl_var name='rewrite_target'> </tmpl_if> RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'><tmpl_if name="rewrite_add_path" op="==" value="y">$1</tmpl_if> <tmpl_var name='rewrite_type'> diff --git a/server/lib/classes/aps_installer.inc.php b/server/lib/classes/aps_installer.inc.php index 5fac926..23c4b5f 100644 --- a/server/lib/classes/aps_installer.inc.php +++ b/server/lib/classes/aps_installer.inc.php @@ -740,6 +740,10 @@ { $app->db->query('DELETE FROM aps_instances WHERE id = "'.$app->db->quote($task['instance_id']).'";'); $app->db->query('DELETE FROM aps_instances_settings WHERE instance_id = "'.$app->db->quote($task['instance_id']).'";'); + if ($app->dbmaster != $app->db) { + $app->dbmaster->query('DELETE FROM aps_instances WHERE id = "'.$app->db->quote($task['instance_id']).'";'); + $app->dbmaster->query('DELETE FROM aps_instances_settings WHERE instance_id = "'.$app->db->quote($task['instance_id']).'";'); + } } unset($sxe); diff --git a/server/lib/classes/cron.d/100-monitor_email_quota.inc.php b/server/lib/classes/cron.d/100-monitor_email_quota.inc.php index 1939a59..62e97b4 100644 --- a/server/lib/classes/cron.d/100-monitor_email_quota.inc.php +++ b/server/lib/classes/cron.d/100-monitor_email_quota.inc.php @@ -83,7 +83,9 @@ $filename = $mb['maildir'].'/.quotausage'; if(file_exists($filename) && !is_link($filename)) { $quotafile = file($filename); - $data[$email]['used'] = trim($quotafile['1']); + preg_match('/storage.*?([0-9]+)/s', implode('',$quotafile), $storage_value); + $data[$email]['used'] = $storage_value[1]; + $app->log("Mail storage $email: " . $storage_value[1], LOGLEVEL_DEBUG); unset($quotafile); } else { exec('du -s '.escapeshellcmd($mb['maildir']), $out); diff --git a/server/lib/classes/cron.d/100-monitor_raid.inc.php b/server/lib/classes/cron.d/100-monitor_raid.inc.php index 9edd061..86a6908 100644 --- a/server/lib/classes/cron.d/100-monitor_raid.inc.php +++ b/server/lib/classes/cron.d/100-monitor_raid.inc.php @@ -177,7 +177,9 @@ system('which tw_cli', $retval); if($retval === 0) { - $data['output'] = shell_exec('tw_cli info c0'); + // TYPOWORX FIX | Determine Controler-ID + $availableControlers = shell_exec('tw_cli info | grep -Eo "c[0-9]+'); + $data['output'] = shell_exec('tw_cli info ' . $availableControlers); $state = 'ok'; if(is_array($data['output'])) { diff --git a/server/lib/classes/cron.d/300-quota_notify.inc.php b/server/lib/classes/cron.d/300-quota_notify.inc.php index 1d24e7c..e8b64fa 100644 --- a/server/lib/classes/cron.d/300-quota_notify.inc.php +++ b/server/lib/classes/cron.d/300-quota_notify.inc.php @@ -214,10 +214,10 @@ $domain = $rec['domain']; $username = $rec['system_user']; - $rec['used'] = $monitor_data['user'][$username]['used']; - $rec['soft'] = $monitor_data['user'][$username]['soft']; - $rec['hard'] = $monitor_data['user'][$username]['hard']; - $rec['files'] = $monitor_data['user'][$username]['files']; + $rec['used'] = @$monitor_data['user'][$username]['used']; + $rec['soft'] = @$monitor_data['user'][$username]['soft']; + $rec['hard'] = @$monitor_data['user'][$username]['hard']; + $rec['files'] = @$monitor_data['user'][$username]['files']; if (!is_numeric($rec['used'])){ if ($rec['used'][0] > $rec['used'][1]){ diff --git a/server/lib/classes/cron.d/500-backup.inc.php b/server/lib/classes/cron.d/500-backup.inc.php index f932744..627cdd5 100644 --- a/server/lib/classes/cron.d/500-backup.inc.php +++ b/server/lib/classes/cron.d/500-backup.inc.php @@ -199,6 +199,9 @@ $web_backup_dir = realpath($backup_dir.'/web'.$web_id); if(is_dir($web_backup_dir)) { exec('sudo -u '.escapeshellarg($web_user).' rm -f '.escapeshellarg($web_backup_dir.'/*')); + $sql = "DELETE FROM web_backup WHERE server_id = ".intval($conf['server_id'])." AND parent_domain_id = ".intval($web_id); + $app->db->query($sql); + if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql); } } } diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php index 6ee9555..92881ba 100644 --- a/server/lib/classes/system.inc.php +++ b/server/lib/classes/system.inc.php @@ -1526,7 +1526,11 @@ function maildirmake($maildir_path, $user = '', $subfolder = '', $group = '') { - global $app; + global $app, $conf; + + // load the server configuration options + $app->uses("getconf"); + $mail_config = $app->getconf->get_server_config($conf["server_id"], 'mail'); if($subfolder != '') { $dir = escapeshellcmd($maildir_path.'/.'.$subfolder); @@ -1571,25 +1575,30 @@ //* Add the subfolder to the subscriptions and courierimapsubscribed files if($subfolder != '') { + // Courier - if(!is_file($maildir_path.'/courierimapsubscribed')) { - $tmp_file = escapeshellcmd($maildir_path.'/courierimapsubscribed'); - touch($tmp_file); - chmod($tmp_file, 0744); - chown($tmp_file, 'vmail'); - chgrp($tmp_file, 'vmail'); + if($mail_config['pop3_imap_daemon'] == 'courier') { + if(!is_file($maildir_path.'/courierimapsubscribed')) { + $tmp_file = escapeshellcmd($maildir_path.'/courierimapsubscribed'); + touch($tmp_file); + chmod($tmp_file, 0744); + chown($tmp_file, 'vmail'); + chgrp($tmp_file, 'vmail'); + } + $this->replaceLine($maildir_path.'/courierimapsubscribed', 'INBOX.'.$subfolder, 'INBOX.'.$subfolder, 1, 1); } - $this->replaceLine($maildir_path.'/courierimapsubscribed', 'INBOX.'.$subfolder, 'INBOX.'.$subfolder, 1, 1); // Dovecot - if(!is_file($maildir_path.'/subscriptions')) { - $tmp_file = escapeshellcmd($maildir_path.'/subscriptions'); - touch($tmp_file); - chmod($tmp_file, 0744); - chown($tmp_file, 'vmail'); - chgrp($tmp_file, 'vmail'); + if($mail_config['pop3_imap_daemon'] == 'dovecot') { + if(!is_file($maildir_path.'/subscriptions')) { + $tmp_file = escapeshellcmd($maildir_path.'/subscriptions'); + touch($tmp_file); + chmod($tmp_file, 0744); + chown($tmp_file, 'vmail'); + chgrp($tmp_file, 'vmail'); + } + $this->replaceLine($maildir_path.'/subscriptions', $subfolder, $subfolder, 1, 1); } - $this->replaceLine($maildir_path.'/subscriptions', $subfolder, $subfolder, 1, 1); } $app->log('Created Maildir '.$maildir_path.' with subfolder: '.$subfolder, LOGLEVEL_DEBUG); diff --git a/server/mods-available/rescue_core_module.inc.php b/server/mods-available/rescue_core_module.inc.php index 94d7ba6..5698273 100644 --- a/server/mods-available/rescue_core_module.inc.php +++ b/server/mods-available/rescue_core_module.inc.php @@ -275,6 +275,17 @@ /* Set the new try counter */ $this->_rescueData['webserver']['try_counter'] = $tryCount; + + if ($tryCount > 2 && $conf['serverconfig']['web']['server_type'] != 'nginx') { + if($app->system->is_user('apache')) { + $app->log("Clearing semaphores table for user apache.",LOGLEVEL_WARN); + exec("ipcs -s | grep apache | awk '{ print $2 }' | xargs ipcrm sem"); + } + if($app->system->is_user('www-data')) { + $app->log("Clearing semaphores table for user apache.",LOGLEVEL_WARN); + exec("ipcs -s | grep www-data | awk '{ print $2 }' | xargs ipcrm sem"); + } + } /* if 5 times will not work, we have to give up... */ if ($tryCount > 5){ diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index c43040b..14b27c4 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -983,6 +983,8 @@ // Make sure we only have Unix linebreaks $vhost_data['apache_directives'] = str_replace("\r\n", "\n", $vhost_data['apache_directives']); $vhost_data['apache_directives'] = str_replace("\r", "\n", $vhost_data['apache_directives']); + $trans = array('{DOCROOT}' => $vhost_data['web_document_root_www']); + $vhost_data['apache_directives'] = strtr($vhost_data['apache_directives'], $trans); // Check if a SSL cert exists $ssl_dir = $data['new']['document_root'].'/ssl'; @@ -1256,6 +1258,7 @@ $fcgi_tpl->setVar('php_fcgi_bin', escapeshellcmd($custom_fastcgi_php_executable)); } $fcgi_tpl->setVar('security_level', intval($web_config['security_level'])); + $fcgi_tpl->setVar('domain', escapeshellcmd($data['new']['domain'])); $php_open_basedir = ($data['new']['php_open_basedir'] == '')?$data['new']['document_root']:$data['new']['php_open_basedir']; $fcgi_tpl->setVar('open_basedir', escapeshellcmd($php_open_basedir)); @@ -2773,6 +2776,7 @@ $tpl->setVar('pm_max_requests', $data['new']['pm_max_requests']); $tpl->setVar('document_root', $data['new']['document_root']); $tpl->setVar('security_level', $web_config['security_level']); + $tpl->setVar('domain', $data['new']['domain']); $php_open_basedir = ($data['new']['php_open_basedir'] == '')?escapeshellcmd($data['new']['document_root']):escapeshellcmd($data['new']['php_open_basedir']); $tpl->setVar('php_open_basedir', $php_open_basedir); if($php_open_basedir != ''){ diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php index 4823cf3..0f2afaf 100644 --- a/server/plugins-available/bind_plugin.inc.php +++ b/server/plugins-available/bind_plugin.inc.php @@ -156,8 +156,12 @@ if(is_file($filename.'.err')) unlink($filename.'.err'); } - //* Reload bind nameserver - $app->services->restartServiceDelayed('bind', 'reload'); + //* Restart bind nameserver if update_acl is not empty, otherwise reload it + if($data['new']['update_acl'] != '') { + $app->services->restartServiceDelayed('bind', 'restart'); + } else { + $app->services->restartServiceDelayed('bind', 'reload'); + } } diff --git a/server/plugins-available/maildeliver_plugin.inc.php b/server/plugins-available/maildeliver_plugin.inc.php index c5b531d..f4d8194 100644 --- a/server/plugins-available/maildeliver_plugin.inc.php +++ b/server/plugins-available/maildeliver_plugin.inc.php @@ -121,7 +121,14 @@ $tpl->newTemplate($filter_file_template); // cc Field + $tmp_mails_arr = explode(',',$data["new"]["cc"]); + $tmp_addresses_arr = array(); + foreach($tmp_mails_arr as $address) { + if(trim($address) != '') $tmp_addresses_arr[] = array('address' => trim($address)); + } + $tpl->setVar('cc', $data["new"]["cc"]); + $tpl->setLoop('ccloop', $tmp_addresses_arr); // Custom filters $tpl->setVar('custom_mailfilter', $data["new"]["custom_mailfilter"]); diff --git a/server/plugins-available/maildrop_plugin.inc.php b/server/plugins-available/maildrop_plugin.inc.php index 73bace8..37b0306 100644 --- a/server/plugins-available/maildrop_plugin.inc.php +++ b/server/plugins-available/maildrop_plugin.inc.php @@ -192,7 +192,11 @@ $mailfilter_content = ''; if($data["new"]["cc"] != '') { - $mailfilter_content .= "cc \"!".$data["new"]["cc"]."\"\n"; + $tmp_mails_arr = explode(',',$data["new"]["cc"]); + foreach($tmp_mails_arr as $address) { + if(trim($address) != '') $mailfilter_content .= "cc \"!".trim($address)."\"\n"; + } + //$mailfilter_content .= "cc \"!".$data["new"]["cc"]."\"\n"; $app->log("Added CC address ".$data["new"]["cc"].' to mailfilter file.', LOGLEVEL_DEBUG); } diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 127161e..878c114 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -2355,6 +2355,7 @@ $tpl->setVar('pm_max_requests', $data['new']['pm_max_requests']); $tpl->setVar('document_root', $data['new']['document_root']); $tpl->setVar('security_level', $web_config['security_level']); + $tpl->setVar('domain', $data['new']['domain']); $php_open_basedir = ($data['new']['php_open_basedir'] == '')?escapeshellcmd($data['new']['document_root']):escapeshellcmd($data['new']['php_open_basedir']); $tpl->setVar('php_open_basedir', $php_open_basedir); if($php_open_basedir != ''){ diff --git a/server/scripts/create_jailkit_user.sh b/server/scripts/create_jailkit_user.sh index da01f9a..5e1060b 100755 --- a/server/scripts/create_jailkit_user.sh +++ b/server/scripts/create_jailkit_user.sh @@ -21,12 +21,12 @@ CHROOT_P_USER=$5 CHROOT_P_USER_HOMEDIR=$6 -### Add the chroot user ### -jk_jailuser -n -s $CHROOT_SHELL -j $CHROOT_HOMEDIR $CHROOT_USERNAME - ### Reconfigure the chroot home directory for the user ### usermod --home=$CHROOT_HOMEDIR/.$CHROOT_USERHOMEDIR $CHROOT_USERNAME 2>/dev/null +### Add the chroot user ### +jk_jailuser -n -s $CHROOT_SHELL -j $CHROOT_HOMEDIR $CHROOT_USERNAME + ### We have to reconfigure the chroot home directory for the parent user ### if [ "$CHROOT_P_USER" != "" ]; then usermod --home=$CHROOT_HOMEDIR/.$CHROOT_P_USER_HOMEDIR $CHROOT_P_USER 2>/dev/null -- Gitblit v1.9.1