Skip to content

Commit 10b4c85

Browse files
committed
Merged revisons 3687-3748 from 3.0.5 stable branch.
1 parent 3ee39be commit 10b4c85

File tree

642 files changed

+5966
-3895
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

642 files changed

+5966
-3895
lines changed

install/dist/lib/fedora.lib.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,11 @@ public function install_ispconfig()
941941
} else {
942942
$content = str_replace('{ssl_comment}', '#', $content);
943943
}
944+
if(is_file($install_dir.'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key') && is_file($install_dir.'/interface/ssl/ispserver.bundle')) {
945+
$content = str_replace('{ssl_bundle_comment}', '', $content);
946+
} else {
947+
$content = str_replace('{ssl_bundle_comment}', '#', $content);
948+
}
944949

945950
wf("$vhost_conf_dir/ispconfig.vhost", $content);
946951

@@ -972,11 +977,11 @@ public function install_ispconfig()
972977
$content = str_replace('{vhost_port}', $conf['nginx']['vhost_port'], $content);
973978

974979
if(is_file($install_dir.'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key')) {
975-
$content = str_replace('{ssl_on}', ' ssl', $content);
980+
$content = str_replace('{ssl_on}', ' on', $content);
976981
$content = str_replace('{ssl_comment}', '', $content);
977982
$content = str_replace('{fastcgi_ssl}', 'on', $content);
978983
} else {
979-
$content = str_replace('{ssl_on}', '', $content);
984+
$content = str_replace('{ssl_on}', ' off', $content);
980985
$content = str_replace('{ssl_comment}', '#', $content);
981986
$content = str_replace('{fastcgi_ssl}', 'off', $content);
982987
}

install/dist/lib/gentoo.lib.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,11 @@ public function install_ispconfig()
929929
} else {
930930
$content = str_replace('{ssl_comment}', '#', $content);
931931
}
932+
if(is_file($install_dir.'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key') && is_file($install_dir.'/interface/ssl/ispserver.bundle')) {
933+
$content = str_replace('{ssl_bundle_comment}', '', $content);
934+
} else {
935+
$content = str_replace('{ssl_bundle_comment}', '#', $content);
936+
}
932937

933938
$vhost_path = $conf['apache']['vhost_conf_dir'].'/ispconfig.vhost';
934939
$this->write_config_file($vhost_path, $content);
@@ -954,11 +959,11 @@ public function install_ispconfig()
954959
$content = str_replace('{vhost_port}', $conf['nginx']['vhost_port'], $content);
955960

956961
if(is_file($install_dir.'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key')) {
957-
$content = str_replace('{ssl_on}', ' ssl', $content);
962+
$content = str_replace('{ssl_on}', ' on', $content);
958963
$content = str_replace('{ssl_comment}', '', $content);
959964
$content = str_replace('{fastcgi_ssl}', 'on', $content);
960965
} else {
961-
$content = str_replace('{ssl_on}', '', $content);
966+
$content = str_replace('{ssl_on}', ' off', $content);
962967
$content = str_replace('{ssl_comment}', '#', $content);
963968
$content = str_replace('{fastcgi_ssl}', 'off', $content);
964969
}

install/dist/lib/opensuse.lib.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,11 @@ public function install_ispconfig()
977977
} else {
978978
$content = str_replace('{ssl_comment}', '#', $content);
979979
}
980+
if(is_file($install_dir.'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key') && is_file($install_dir.'/interface/ssl/ispserver.bundle')) {
981+
$content = str_replace('{ssl_bundle_comment}', '', $content);
982+
} else {
983+
$content = str_replace('{ssl_bundle_comment}', '#', $content);
984+
}
980985

981986
$content = str_replace('/var/www/', '/srv/www/', $content);
982987

@@ -1015,11 +1020,11 @@ public function install_ispconfig()
10151020
$content = str_replace('{vhost_port}', $conf['nginx']['vhost_port'], $content);
10161021

10171022
if(is_file($install_dir.'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key')) {
1018-
$content = str_replace('{ssl_on}', ' ssl', $content);
1023+
$content = str_replace('{ssl_on}', ' on', $content);
10191024
$content = str_replace('{ssl_comment}', '', $content);
10201025
$content = str_replace('{fastcgi_ssl}', 'on', $content);
10211026
} else {
1022-
$content = str_replace('{ssl_on}', '', $content);
1027+
$content = str_replace('{ssl_on}', ' off', $content);
10231028
$content = str_replace('{ssl_comment}', '#', $content);
10241029
$content = str_replace('{fastcgi_ssl}', 'off', $content);
10251030
}

install/lib/installer_base.lib.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1885,6 +1885,11 @@ public function install_ispconfig() {
18851885
} else {
18861886
$content = str_replace('{ssl_comment}', '#', $content);
18871887
}
1888+
if(is_file($install_dir.'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key') && is_file($install_dir.'/interface/ssl/ispserver.bundle')) {
1889+
$content = str_replace('{ssl_bundle_comment}', '', $content);
1890+
} else {
1891+
$content = str_replace('{ssl_bundle_comment}', '#', $content);
1892+
}
18881893

18891894
wf($vhost_conf_dir.'/ispconfig.vhost', $content);
18901895

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
ALTER TABLE `web_database` ADD `database_name_prefix` VARCHAR( 50 ) NOT NULL AFTER `database_name`;
3+
UPDATE `web_database` SET `database_name_prefix` = '#' WHERE 1;
4+
ALTER TABLE `web_database_user` ADD `database_user_prefix` VARCHAR( 50 ) NOT NULL AFTER `database_user`;
5+
UPDATE `web_database_user` SET `database_user_prefix` = '#' WHERE 1;
6+
ALTER TABLE `ftp_user` ADD `username_prefix` VARCHAR( 50 ) NOT NULL AFTER `username`;
7+
UPDATE `ftp_user` SET `username_prefix` = '#' WHERE 1;
8+
ALTER TABLE `shell_user` ADD `username_prefix` VARCHAR( 50 ) NOT NULL AFTER `username`;
9+
UPDATE `shell_user` SET `username_prefix` = '#' WHERE 1;
10+
ALTER TABLE `webdav_user` ADD `username_prefix` VARCHAR( 50 ) NOT NULL AFTER `username`;
11+
UPDATE `webdav_user` SET `username_prefix` = '#' WHERE 1;

install/sql/ispconfig3.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,7 @@ CREATE TABLE `ftp_user` (
526526
`server_id` int(11) unsigned NOT NULL default '0',
527527
`parent_domain_id` int(11) unsigned NOT NULL default '0',
528528
`username` varchar(64) default NULL,
529+
`username_prefix` varchar(50) NOT NULL default '',
529530
`password` varchar(64) default NULL,
530531
`quota_size` bigint(20) NOT NULL default '-1',
531532
`active` enum('n','y') NOT NULL default 'y',
@@ -1179,6 +1180,7 @@ CREATE TABLE `shell_user` (
11791180
`server_id` int(11) unsigned NOT NULL default '0',
11801181
`parent_domain_id` int(11) unsigned NOT NULL default '0',
11811182
`username` varchar(64) default NULL,
1183+
`username_prefix` varchar(50) NOT NULL default '',
11821184
`password` varchar(64) default NULL,
11831185
`quota_size` bigint(20) NOT NULL default '-1',
11841186
`active` enum('n','y') NOT NULL default 'y',
@@ -1608,6 +1610,7 @@ CREATE TABLE `webdav_user` (
16081610
`server_id` int(11) unsigned NOT NULL DEFAULT '0',
16091611
`parent_domain_id` int(11) unsigned NOT NULL DEFAULT '0',
16101612
`username` varchar(64) DEFAULT NULL,
1613+
`username_prefix` varchar(50) NOT NULL default '',
16111614
`password` varchar(64) DEFAULT NULL,
16121615
`active` enum('n','y') NOT NULL DEFAULT 'y',
16131616
`dir` varchar(255) DEFAULT NULL,
@@ -1648,6 +1651,7 @@ CREATE TABLE `web_database` (
16481651
`parent_domain_id` int(11) unsigned NOT NULL DEFAULT '0',
16491652
`type` varchar(16) NOT NULL DEFAULT 'y',
16501653
`database_name` varchar(64) DEFAULT NULL,
1654+
`database_name_prefix` varchar(50) NOT NULL default '',
16511655
`database_user_id` int(11) unsigned DEFAULT NULL,
16521656
`database_ro_user_id` int(11) unsigned DEFAULT NULL,
16531657
`database_charset` varchar(64) DEFAULT NULL,
@@ -1676,6 +1680,7 @@ CREATE TABLE IF NOT EXISTS `web_database_user` (
16761680
`sys_perm_other` varchar(5) DEFAULT NULL,
16771681
`server_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
16781682
`database_user` varchar(64) DEFAULT NULL,
1683+
`database_user_prefix` varchar(50) NOT NULL default '',
16791684
`database_password` varchar(64) DEFAULT NULL,
16801685
PRIMARY KEY (`database_user_id`)
16811686
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

install/tpl/apache_ispconfig.vhost.master

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ NameVirtualHost *:{vhost_port}
2525
Order allow,deny
2626
Allow from all
2727
</Directory>
28+
IPCCommTimeout 7200
2829
</IfModule>
2930

3031
# <IfModule mod_php5.c>
@@ -52,6 +53,7 @@ NameVirtualHost *:{vhost_port}
5253
{ssl_comment}SSLEngine On
5354
{ssl_comment}SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt
5455
{ssl_comment}SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key
56+
{ssl_bundle_comment}SSLCACertificateFile /usr/local/ispconfig/interface/ssl/ispserver.bundle
5557

5658
</VirtualHost>
5759

install/tpl/server.ini.master

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ website_basedir=/var/www
4444
website_path=/var/www/clients/client[client_id]/web[website_id]
4545
website_symlinks=/var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/
4646
website_symlinks_rel=n
47-
vhost_rewrite_v6=n
4847
vhost_conf_dir=/etc/apache2/sites-available
4948
vhost_conf_enabled_dir=/etc/apache2/sites-enabled
5049
nginx_vhost_conf_dir=/etc/nginx/sites-available

install/tpl/system.ini.master

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ webdavuser_prefix=[CLIENTNAME]
2222
dblist_phpmyadmin_link=y
2323
phpmyadmin_url=/phpmyadmin
2424
webftp_url=
25+
client_username_web_check_disabled=n
2526

2627
[tools]
2728

@@ -34,4 +35,8 @@ dashboard_atom_url_admin=http://www.ispconfig.org/atom
3435
dashboard_atom_url_reseller=http://www.ispconfig.org/atom
3536
dashboard_atom_url_client=http://www.ispconfig.org/atom
3637
monitor_key=
38+
tab_change_discard=n
39+
tab_change_warning=n
40+
use_loadindicator=y
41+
use_combobox=y
3742
maintenance_mode=n

interface/lib/classes/aps_guicontroller.inc.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -285,21 +285,21 @@ public function createPackageInstance($settings, $packageid)
285285
}
286286
//* Find a free db username for the app
287287
for($n = 1; $n <= 1000; $n++) {
288-
$mysql_db_user = ($dbname_prefix != '' ? $dbname_prefix.'aps'.$n : uniqid('aps'));
288+
$mysql_db_user = ($dbuser_prefix != '' ? $dbuser_prefix.'aps'.$n : uniqid('aps'));
289289
$tmp = $app->db->queryOneRecord("SELECT count(database_user_id) as number FROM web_database_user WHERE database_user = '".$app->db->quote($mysql_db_user)."'");
290290
if($tmp['number'] == 0) break;
291291
}
292292

293293
$mysql_db_password = $settings['main_database_password'];
294294

295295
//* Create the mysql database user
296-
$insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `database_user`, `database_password`)
297-
VALUES( ".$websrv['sys_userid'].", ".$websrv['sys_groupid'].", 'riud', '".$websrv['sys_perm_group']."', '', 0, '$mysql_db_user', PASSWORD('$mysql_db_password'))";
296+
$insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `database_user`, `database_user_prefix`, `database_password`)
297+
VALUES( ".$websrv['sys_userid'].", ".$websrv['sys_groupid'].", 'riud', '".$websrv['sys_perm_group']."', '', 0, '$mysql_db_user', '".$app->db->quote($dbuser_prefix) . "', PASSWORD('$mysql_db_password'))";
298298
$mysql_db_user_id = $app->db->datalogInsert('web_database_user', $insert_data, 'database_user_id');
299299

300300
//* Create the mysql database
301-
$insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `parent_domain_id`, `type`, `database_name`, `database_user_id`, `database_ro_user_id`, `database_charset`, `remote_access`, `remote_ips`, `backup_copies`, `active`, `backup_interval`)
302-
VALUES( ".$websrv['sys_userid'].", ".$websrv['sys_groupid'].", 'riud', '".$websrv['sys_perm_group']."', '', $mysql_db_server_id, ".$websrv['domain_id'].", 'mysql', '$mysql_db_name', '$mysql_db_user_id', 0, '', '$mysql_db_remote_access', '$mysql_db_remote_ips', ".$websrv['backup_copies'].", 'y', '".$websrv['backup_interval']."')";
301+
$insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `parent_domain_id`, `type`, `database_name`, `database_name_prefix`, `database_user_id`, `database_ro_user_id`, `database_charset`, `remote_access`, `remote_ips`, `backup_copies`, `active`, `backup_interval`)
302+
VALUES( ".$websrv['sys_userid'].", ".$websrv['sys_groupid'].", 'riud', '".$websrv['sys_perm_group']."', '', $mysql_db_server_id, ".$websrv['domain_id'].", 'mysql', '$mysql_db_name', '" . $app->db->quote($dbname_prefix) . "', '$mysql_db_user_id', 0, '', '$mysql_db_remote_access', '$mysql_db_remote_ips', ".$websrv['backup_copies'].", 'y', '".$websrv['backup_interval']."')";
303303
$app->db->datalogInsert('web_database', $insert_data, 'database_id');
304304

305305
//* Add db details to package settings
@@ -542,15 +542,15 @@ public function validateInstallerInput($postinput, $pkg_details, $domains, $sett
542542
// is not empty for further validation
543543
if(!empty($doc_root))
544544
{
545-
$used_path = $docroot['document_root'];
545+
$used_path = $doc_root['document_root'];
546546
if(substr($used_path, -1) != '/') $used_path .= '/';
547547

548548
$location_for_domain = $app->db->queryOneRecord("SELECT value
549549
FROM aps_instances_settings WHERE name = 'main_location'
550550
AND instance_id = '".$app->db->quote($instance_domains[$i]['instance_id'])."';");
551551

552552
// The location might be empty but the DB return must not be false!
553-
if($location_for_domain) $used_path .= $location_for_domain['value'];
553+
if($location_for_domain) $used_path .= $location_for_domain['value'];
554554

555555
if($new_path == $used_path)
556556
{

0 commit comments

Comments
 (0)