Changeset 1003
- Timestamp:
- 02/15/08 20:41:19
(10 months ago)
- Author:
- rats
- Message:
* Fixed #850: If user IP doesn't match the reseller IP the message in manage_reseller_users.php is wrong
* Fixed #894: Domain Alias as Forward - including directory information
* Fixed #1018: Missing "&" in the cron ?
* Fixed #1023: master domain can be added as user
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1001 |
r1003 |
|
| 1 | 1 | ispCP ω 1.0.0 Changelog |
|---|
| 2 | 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| | 3 | |
|---|
| | 4 | 2008-02-15 Benedikt Heintel |
|---|
| | 5 | - CONFIGS: |
|---|
| | 6 | * Fixed #1018: Missing "&" in the cron ? |
|---|
| | 7 | - GUI: |
|---|
| | 8 | * Fixed #850: If user IP doesn't match the reseller IP the message in manage_reseller_users.php is wrong |
|---|
| | 9 | * Fixed #894: Domain Alias as Forward - including directory information |
|---|
| | 10 | * Fixed #1023: master domain can be added as user |
|---|
| 3 | 11 | |
|---|
| 4 | 12 | 2008-02-13 Benedikt Heintel |
|---|
| r943 |
r1003 |
|
| 7 | 7 | # Traffic |
|---|
| 8 | 8 | 0,30 * * * * root {TRAFF_ROOT_DIR}/ispcp-srv-traff &>{LOG_DIR}/ispcp-srv-traff.log |
|---|
| 9 | | 0,30 * * * * root {TRAFF_ROOT_DIR}/ispcp-vrl-traff >{LOG_DIR}/ispcp-vrl-traff.log |
|---|
| | 9 | 0,30 * * * * root {TRAFF_ROOT_DIR}/ispcp-vrl-traff &>{LOG_DIR}/ispcp-vrl-traff.log |
|---|
| 10 | 10 | 15,45 * * * * root {TRAFF_ROOT_DIR}/ispcp-vrl-traff-correction &>{LOG_DIR}/ispcp-vrl-traff-correction.log |
|---|
| 11 | 11 | |
|---|
| … | … | |
| 27 | 27 | |
|---|
| 28 | 28 | # Rootkit Hunter |
|---|
| 29 | | {RK-ENABLED}0 */12 * * * root {RKHUNTER} --scan-knownbad-files --check-deleted --createlogfile --cronjob --createlogfile {RKHUNTER_LOG}>/dev/null 2>&1 |
|---|
| | 29 | {RK-ENABLED}0 */12 * * * root {RKHUNTER} --scan-knownbad-files --check-deleted --createlogfile --cronjob --createlogfile {RKHUNTER_LOG} >/dev/null 2>&1 |
|---|
| 30 | 30 | |
|---|
| 31 | 31 | # Chkrootkit |
|---|
| r817 |
r1003 |
|
| 477 | 477 | return $rs if ($rs != 0); |
|---|
| 478 | 478 | |
|---|
| 479 | | my $cmd_du = $main::cfg{'CMD_DU'}; |
|---|
| 480 | | |
|---|
| 481 | | my $size = `$cmd_du -sb $htaccess_file`; |
|---|
| 482 | | |
|---|
| 483 | | if ($size<2) { |
|---|
| | 479 | my $cmd_wc = $main::cfg{'CMD_WC'}; |
|---|
| | 480 | |
|---|
| | 481 | my $size = `$cmd_wc -c < $htaccess_file`; |
|---|
| | 482 | |
|---|
| | 483 | if ($size < 2) { |
|---|
| 484 | 484 | |
|---|
| 485 | 485 | del_file($htaccess_file); |
|---|
| … | … | |
| 793 | 793 | my $id = $_; |
|---|
| 794 | 794 | |
|---|
| | 795 | my ($uname, $ucounter) = (undef, undef); |
|---|
| | 796 | |
|---|
| 795 | 797 | $sql = "select uname from htaccess_users where id = $id"; |
|---|
| 796 | 798 | |
|---|
| … | … | |
| 801 | 803 | $rdata = @$rdata[0]; |
|---|
| 802 | 804 | |
|---|
| 803 | | my ($uname) = (@$rdata[0]); |
|---|
| | 805 | $uname = @$rdata[0]; |
|---|
| 804 | 806 | |
|---|
| 805 | 807 | $rs = htuser_del_group_data($dmn_name, $gname, $uname); |
|---|
| … | … | |
| 815 | 817 | $rdata = @$rdata[0]; |
|---|
| 816 | 818 | |
|---|
| 817 | | my ($uname,$ucounter) = (@$rdata[0],@$rdata[1]); |
|---|
| | 819 | ($uname,$ucounter) = (@$rdata[0],@$rdata[1]); |
|---|
| 818 | 820 | |
|---|
| 819 | 821 | if($ucounter == 0) { |
|---|
| … | … | |
| 851 | 853 | return $rs if ($rs != 0); |
|---|
| 852 | 854 | |
|---|
| 853 | | my $cmd_du = $main::cfg{'CMD_DU'}; |
|---|
| 854 | | |
|---|
| 855 | | my $size = `$cmd_du -sb $htaccess_file`; |
|---|
| 856 | | |
|---|
| 857 | | if ($size<2) { |
|---|
| 858 | | |
|---|
| | 855 | my $cmd_wc = $main::cfg{'CMD_WC'}; |
|---|
| | 856 | |
|---|
| | 857 | my $size = `$cmd_wc -c < $htaccess_file`; |
|---|
| | 858 | |
|---|
| | 859 | if ($size < 2) { |
|---|
| 859 | 860 | del_file($htaccess_file); |
|---|
| 860 | 861 | |
|---|
| r817 |
r1003 |
|
| 4 | 4 | * |
|---|
| 5 | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| 7 | 7 | * @version SVN: $ID$ |
|---|
| 8 | 8 | * @link http://isp-control.net |
|---|
| 9 | | * @author ispCP Team (2007) |
|---|
| | 9 | * @author ispCP Team |
|---|
| 10 | 10 | * |
|---|
| 11 | 11 | * @license |
|---|
| … | … | |
| 364 | 364 | return; |
|---|
| 365 | 365 | } else if ($dest_max > 0 && $src_max == 0 && $umax == 0) { |
|---|
| | 366 | if ($err == '_off_') { |
|---|
| | 367 | $err = ''; |
|---|
| | 368 | } |
|---|
| 366 | 369 | $err .= tr('<b>%1$s</b> has unlimited rights for a <b>%2$s</b> Service !<br>', $uname, $obj); |
|---|
| 367 | 370 | |
|---|
| … | … | |
| 371 | 374 | } else if ($dest_max > 0 && $src_max == 0 && $umax > 0) { |
|---|
| 372 | 375 | if ($dest + $umax > $dest_max) { |
|---|
| | 376 | if ($err == '_off_') { |
|---|
| | 377 | $err = ''; |
|---|
| | 378 | } |
|---|
| 373 | 379 | $err .= tr('<b>%1$s</b> is exceeding limits for a <b>%2$s</b><br>service in destination reseller!<br>', $uname, $obj); |
|---|
| 374 | 380 | |
|---|
| … | … | |
| 388 | 394 | } else if ($dest_max > 0 && $src_max > 0 && $umax > 0) { |
|---|
| 389 | 395 | if ($dest + $umax > $dest_max) { |
|---|
| | 396 | if ($err == '_off_') { |
|---|
| | 397 | $err = ''; |
|---|
| | 398 | } |
|---|
| 390 | 399 | $err .= tr('<b>%1$s</b> is exceeding limits for a <b>%2$s</b><br>service in destination reseller!<br>', $uname, $obj); |
|---|
| 391 | 400 | |
|---|
| … | … | |
| 423 | 432 | |
|---|
| 424 | 433 | if (!preg_match("/$domain_ip_id;/", $dest)) { |
|---|
| | 434 | if ($err == '_off_') { |
|---|
| | 435 | $err = ''; |
|---|
| | 436 | } |
|---|
| 425 | 437 | $err .= tr('<b>%s</b> has IP address that can not be managed from the destination reseller !<br>This user can not be moved!', $domain_name); |
|---|
| 426 | 438 | |
|---|
| r900 |
r1003 |
|
| 4 | 4 | * |
|---|
| 5 | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| | 7 | * @version SVN: $ID$ |
|---|
| 7 | 8 | * @link http://isp-control.net |
|---|
| 8 | | * @author ispCP Team (2007) |
|---|
| | 9 | * @author ispCP Team |
|---|
| 9 | 10 | * |
|---|
| 10 | 11 | * @license |
|---|
| … | … | |
| 81 | 82 | $tpl-> assign("PAGE_MESSAGE", ""); |
|---|
| 82 | 83 | } |
|---|
| 83 | | |
|---|
| 84 | | gen_al_page($tpl, $_SESSION['user_id']); |
|---|
| 85 | | gen_page_msg($tpl, $err_txt); |
|---|
| 86 | | |
|---|
| 87 | | //gen_page_message($tpl); |
|---|
| 88 | | |
|---|
| 89 | | $tpl->parse('PAGE', 'page'); |
|---|
| 90 | | |
|---|
| 91 | | $tpl->prnt(); |
|---|
| 92 | | |
|---|
| 93 | | if ($cfg['DUMP_GUI_DEBUG']) dump_gui_debug(); |
|---|
| 94 | | |
|---|
| 95 | 84 | |
|---|
| 96 | 85 | // |
|---|
| … | … | |
| 124 | 113 | $als_cnt = get_domain_running_als_cnt($sql, $dmn_id); |
|---|
| 125 | 114 | |
|---|
| 126 | | if ($dmn_als_limit != 0 && $als_cnt >= $dmn_als_limit) |
|---|
| 127 | | { |
|---|
| 128 | | |
|---|
| 129 | | set_page_message(tr('Domain alias limit reached!')); |
|---|
| 130 | | |
|---|
| 131 | | header("Location: manage_domains.php"); |
|---|
| 132 | | |
|---|
| 133 | | die(); |
|---|
| 134 | | |
|---|
| 135 | | } |
|---|
| | 115 | if ($dmn_als_limit != 0 && $als_cnt >= $dmn_als_limit) { |
|---|
| | 116 | set_page_message(tr('Domain alias limit reached!')); |
|---|
| | 117 | header("Location: manage_domains.php"); |
|---|
| | 118 | die(); |
|---|
| | 119 | } |
|---|
| 136 | 120 | |
|---|
| 137 | 121 | |
|---|
| … | … | |
| 152 | 136 | // Show data fiels |
|---|
| 153 | 137 | function gen_al_page(&$tpl, $reseller_id) { |
|---|
| 154 | | global $cr_user_id, $alias_name, $domain_ip, $forward, $mount_point; |
|---|
| 155 | | |
|---|
| 156 | | if (isset($_POST['forward'])) |
|---|
| 157 | | { |
|---|
| | 138 | global $cr_user_id, $alias_name, $domain_ip, $forward, $mount_point, $cfg; |
|---|
| | 139 | |
|---|
| | 140 | if (isset($_POST['forward'])) { |
|---|
| 158 | 141 | $forward = $_POST['forward']; |
|---|
| 159 | | } |
|---|
| 160 | | else |
|---|
| 161 | | { |
|---|
| | 142 | } else { |
|---|
| 162 | 143 | $forward = 'no'; |
|---|
| 163 | 144 | } |
|---|
| … | … | |
| 206 | 187 | } else if (!chk_mountp($mount_point) && $mount_point != '/') { |
|---|
| 207 | 188 | $err_al = tr("Incorrect mount point syntax"); |
|---|
| | 189 | } else if ($alias_name == $cfg['BASE_SERVER_VHOST']) { |
|---|
| | 190 | $err_al = tr('Master domain cannot be used!'); |
|---|
| 208 | 191 | } else if ($forward != 'no') { |
|---|
| 209 | | if (!chk_url($forward)) { |
|---|
| | 192 | if (!chk_forward_url($forward)) { |
|---|
| 210 | 193 | $err_al = tr("Incorrect forward syntax"); |
|---|
| 211 | 194 | } |
|---|
| | 195 | if (!preg_match("/\/$/", $forward)) { |
|---|
| | 196 | $forward .= "/"; |
|---|
| | 197 | } |
|---|
| 212 | 198 | } else { |
|---|
| 213 | 199 | //now lets fix the mountpoint |
|---|
| … | … | |
| 333 | 319 | }//End of gen_page_msg() |
|---|
| 334 | 320 | |
|---|
| | 321 | gen_al_page($tpl, $_SESSION['user_id']); |
|---|
| | 322 | gen_page_msg($tpl, $err_txt); |
|---|
| | 323 | |
|---|
| | 324 | //gen_page_message($tpl); |
|---|
| | 325 | |
|---|
| | 326 | $tpl->parse('PAGE', 'page'); |
|---|
| | 327 | $tpl->prnt(); |
|---|
| | 328 | |
|---|
| | 329 | if ($cfg['DUMP_GUI_DEBUG']) |
|---|
| | 330 | dump_gui_debug(); |
|---|
| | 331 | |
|---|
| 335 | 332 | ?> |
|---|
| r805 |
r1003 |
|
| 4 | 4 | * |
|---|
| 5 | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| 7 | 7 | * @version SVN: $ID$ |
|---|
| 8 | 8 | * @link http://isp-control.net |
|---|
| 9 | | * @author ispCP Team (2007) |
|---|
| | 9 | * @author ispCP Team |
|---|
| 10 | 10 | * |
|---|
| 11 | 11 | * @license |
|---|
| … | … | |
| 162 | 162 | |
|---|
| 163 | 163 | if ($forward_url != 'no') { |
|---|
| 164 | | // @todo check chk_url |
|---|
| 165 | | if (!chk_url($forward_url)) { |
|---|
| | 164 | if (!chk_forward_url($forward_url)) { |
|---|
| 166 | 165 | $ed_error = tr("Incorrect forward syntax"); |
|---|
| 167 | 166 | } |
|---|
| | 167 | if (!preg_match("/\/$/", $forward)) { |
|---|
| | 168 | $forward .= "/"; |
|---|
| | 169 | } |
|---|
| 168 | 170 | } |
|---|
| 169 | 171 | |
|---|
| r997 |
r1003 |
|
| 374 | 374 | |
|---|
| 375 | 375 | /** |
|---|
| 376 | | * @function chk_url |
|---|
| | 376 | * @function chk_forward_url |
|---|
| 377 | 377 | * @description Function for checking URL syntax |
|---|
| 378 | 378 | * |
|---|
| … | … | |
| 381 | 381 | * true correct syntax |
|---|
| 382 | 382 | */ |
|---|
| 383 | | function chk_url($url) { |
|---|
| | 383 | function chk_forward_url($url) { |
|---|
| 384 | 384 | |
|---|
| 385 | 385 | $dom_mainpart = '[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]\.'; |
|---|
| … | … | |
| 388 | 388 | $domain = $dom_subpart.$dom_mainpart.$dom_tldpart; |
|---|
| 389 | 389 | |
|---|
| 390 | | if (!preg_match("/^(http|https|ftp)\:\/\/".$domain."$/", $url)) |
|---|
| | 390 | if (!preg_match("/^(http|https|ftp)\:\/\/".$domain."/", $url)) |
|---|
| 391 | 391 | return FALSE; |
|---|
| 392 | 392 | |
|---|
| r962 |
r1003 |
|
| 4 | 4 | * |
|---|
| 5 | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| | 7 | * @version SVN: $ID$ |
|---|
| 7 | 8 | * @link http://isp-control.net |
|---|
| 8 | | * @author ispCP Team (2007) |
|---|
| | 9 | * @author ispCP Team |
|---|
| 9 | 10 | * |
|---|
| 10 | 11 | * @license |
|---|
| … | … | |
| 19 | 20 | **/ |
|---|
| 20 | 21 | |
|---|
| 21 | | |
|---|
| 22 | 22 | $cfg_obj = new Config('/etc/ispcp/ispcp.conf'); |
|---|
| 23 | 23 | |
|---|
| … | … | |
| 26 | 26 | |
|---|
| 27 | 27 | if ($cfg_obj->status == 'err') { |
|---|
| 28 | | /* cannot open ispcp.conf file - we must show warning */ |
|---|
| | 28 | /* cannot open ispcp.conf file - we must show warning */ |
|---|
| 29 | 29 | print "<center><b><font color=red>Cannot open the ispcp.conf config file !<br><br>Please contact your system administrator</font></b></center>"; |
|---|
| 30 | | die(); |
|---|
| | 30 | die(); |
|---|
| 31 | 31 | } |
|---|
| 32 | 32 | |
|---|
| 33 | 33 | if (substr($cfg_obj->status, 0, 24) == 'missing config variable:') { |
|---|
| 34 | 34 | /* cannot open ispcp.conf file - we must show warning */ |
|---|
| 35 | | print "<center><b><font color=red>config variable ".substr($cfg_obj->status, 25)." is missing!<br><br>Please contact your system administrator</font></b></center>"; |
|---|
| 36 | | die(); |
|---|
| | 35 | print "<center><b><font color=red>config variable ".substr($cfg_obj->status, 25)." is missing!<br><br>Please contact your system administrator</font></b></center>"; |
|---|
| | 36 | die(); |
|---|
| 37 | 37 | } |
|---|
| 38 | 38 | } |
|---|
| … | … | |
| 41 | 41 | |
|---|
| 42 | 42 | class Config { |
|---|
| 43 | | /* |
|---|
| 44 | | this class will parse config file and get all variables avaible in PHP */ |
|---|
| | 43 | /* this class will parse config file and get all variables avaible in PHP */ |
|---|
| 45 | 44 | var $config_file; /* config filename */ |
|---|
| 46 | 45 | |
|---|
| 47 | | /* IMPORTANT: any adding & removing of variables in /etc/ispcp/ispcp.conf should also be made here! */ |
|---|
| | 46 | /* IMPORTANT: any adding & removing of variables in /etc/ispcp/ispcp.conf should also be made here! */ |
|---|
| 48 | 47 | var $cfg_values = array( /* array with all options from config file - predefined with null */ |
|---|
| 49 | | 'BuildDate' => null, |
|---|
| 50 | | 'Version' => null, |
|---|
| 51 | | 'VersionH' => null, |
|---|
| 52 | | 'DEFAULT_ADMIN_ADDRESS' => null, |
|---|
| 53 | | 'SERVER_HOSTNAME' => null, |
|---|
| 54 | | 'BASE_SERVER_IP' => null, |
|---|
| 55 | | 'BASE_SERVER_VHOST' => null, |
|---|
| 56 | | 'MR_LOCK_FILE' => null, |
|---|
| 57 | | 'CMD_AWK' => null, |
|---|
| 58 | | 'CMD_BZCAT' => null, |
|---|
| 59 | | 'CMD_BZIP' => null, |
|---|
| 60 | | 'CMD_CHOWN' => null, |
|---|
| 61 | | 'CMD_CAT' => null, |
|---|
| 62 | | 'CMD_CHMOD' => null, |
|---|
| 63 | | 'CMD_CP' => null, |
|---|
| 64 | | 'CMD_DIFF' => null, |
|---|
| 65 | | 'CMD_DU' => null, |
|---|
| 66 | | 'CMD_ECHO' => null, |
|---|
| 67 | | 'CMD_GZCAT' => null, |
|---|
| 68 | | 'CMD_GZIP' => null, |
|---|
| 69 | | 'CMD_GREP' => null, |
|---|
| 70 | | 'CMD_GROUPADD' => null, |
|---|
| 71 | | 'CMD_GROUPDEL' => null, |
|---|
| 72 | | 'CMD_HOSTNAME' => null, |
|---|
| 73 | | 'CMD_IFCONFIG' => null, |
|---|
| 74 | | 'CMD_IPTABLES' => null, |
|---|
| 75 | | 'CMD_LN' => null, |
|---|
| 76 | | 'CMD_MYSQL' => null, |
|---|
| 77 | | 'CMD_MV' => null, |
|---|
| 78 | | 'CMD_PS' => null, |
|---|
| 79 | | 'CMD_RM' => null, |
|---|
| 80 | | 'CMD_SHELL' => null, |
|---|
| 81 | | 'CMD_TAR' => null, |
|---|
| 82 | | 'CMD_TOUCH' => null, |
|---|
| 83 | | 'CMD_USERADD' => null, |
|---|
| 84 | | 'CMD_USERDEL' => null, |
|---|
| 85 | | 'CMD_WC' => null, |
|---|
| 86 | | 'PEAR_DIR' => null, |
|---|
| 87 | | 'DATABASE_TYPE' => null, |
|---|
| 88 | | 'DATABASE_HOST' => null, |
|---|
| 89 | | 'DATABASE_NAME' => null, |
|---|
| 90 | | 'DATABASE_PASSWORD' => null, |
|---|
| 91 | | 'DATABASE_USER' => null, |
|---|
| 92 | | 'DATABASE_DIR' => null, |
|---|
| 93 | | 'CMD_MYSQLDUMP' => null, |
|---|
| 94 | | 'CONF_DIR' => null, |
|---|
| 95 | | 'LOG_DIR' => null, |
|---|
| 96 | | 'PHP_STARTER_DIR' => null, |
|---|
| 97 | | 'ROOT_DIR' => null, |
|---|
| 98 | | 'GUI_ROOT_DIR' => null, |
|---|
| 99 | | 'APACHE_WWW_DIR' => null, |
|---|
| 100 | | 'SCOREBOARDS_DIR' => null, |
|---|
| 101 | | 'ZIP' => null, |
|---|
| 102 | | 'PHP4_FASTCGI_BIN' => null, |
|---|
| 103 | | 'PHP5_FASTCGI_BIN' => null, |
|---|
| 104 | | 'PHP_VERSION' => null, |
|---|
| 105 | | 'FTPD_CONF_FILE' => null, |
|---|
| 106 | | 'BIND_CONF_FILE' => null, |
|---|
| 107 | | 'BIND_DB_DIR' => null, |
|---|
| 108 | | 'SECONDARY_DNS' => null, |
|---|
| 109 | | 'AWSTATS_ACTIVE' => null, |
|---|
| 110 | | 'AWSTATS_MODE' => null, |
|---|
| 111 | | 'AWSTATS_CACHE_DIR' => null, |
|---|
| 112 | | 'AWSTATS_CONFIG_DIR' => null, |
|---|
| 113 | | 'AWSTATS_ENGINE_DIR' => null, |
|---|
| 114 | | 'AWSTATS_WEB_DIR' => null, |
|---|
| 115 | | 'AWSTATS_ROOT_DIR' => null, |
|---|
| 116 | | 'APACHE_NAME' => null, |
|---|
| 117 | | 'APACHE_RESTART_TRY' => null, |
|---|
| 118 | | 'APACHE_CONF_DIR' => null, |
|---|
| 119 | | 'APACHE_CMD' => null, |
|---|
| 120 | | 'APACHE_LOG_DIR' => null, |
|---|
| 121 | | 'APACHE_BACKUP_LOG_DIR' => null, |
|---|
| 122 | | 'APACHE_USERS_LOG_DIR' => null, |
|---|
| 123 | | 'APACHE_MODS_DIR' => null, |
|---|
| 124 | | 'APACHE_SITES_DIR' => null, |
|---|
| 125 | | 'APACHE_CUSTOM_SITES_CONFIG_DIR' => null, |
|---|
| 126 | | 'APACHE_SUEXEC_USER_PREF' => null, |
|---|
| 127 | | 'APACHE_SUEXEC_MIN_GID' => null, |
|---|
| 128 | | 'APACHE_SUEXEC_MIN_UID' => null, |
|---|
| 129 | | 'APACHE_USER' => null, |
|---|
| 130 | | 'APACHE_GROUP' => null, |
|---|
| 131 | | 'POSTFIX_CONF_FILE' => null, |
|---|
| 132 | | 'POSTFIX_MASTER_CONF_FILE' => null, |
|---|
| 133 | | 'MTA_LOCAL_MAIL_DIR' => null, |
|---|
| 134 | | 'MTA_VIRTUAL_MAIL_DIR' => null, |
|---|
| 135 | | 'MTA_LOCAL_ALIAS_HASH' => null, |
|---|
| 136 | | 'MTA_VIRTUAL_CONF_DIR' => null, |
|---|
| 137 | | 'MTA_VIRTUAL_ALIAS_HASH' => null, |
|---|
| 138 | | 'MTA_VIRTUAL_DMN_HASH' => null, |
|---|
| 139 | | 'MTA_VIRTUAL_MAILBOX_HASH' => null, |
|---|
| 140 | | 'MTA_TRANSPORT_HASH' => null, |
|---|
| 141 | | 'MTA_SENDER_ACCESS_HASH' => null, |
|---|
| 142 | | 'MTA_MAILBOX_MIN_UID' => null, |
|---|
| 143 | | 'MTA_MAILBOX_UID' => null, |
|---|
| 144 | | 'MTA_MAILBOX_UID_NAME' => null, |
|---|
| 145 | | 'MTA_MAILBOX_GID' => null, |
|---|
| 146 | | 'MTA_MAILBOX_GID_NAME' => null, |
|---|
| 147 | | 'MTA_SASLDB_FILE' => null, |
|---|
| 148 | | 'ETC_SASLDB_FILE' => null, |
|---|
| 149 | | 'CMD_SASLDB_LISTUSERS2' => null, |
|---|
| 150 | | 'CMD_SASLDB_PASSWD2' => null, |
|---|
| 151 | | 'CMD_POSTMAP' => null, |
|---|
| 152 | | 'CMD_NEWALIASES' => null, |
|---|
| 153 | | 'COURIER_CONF_DIR' => null, |
|---|
| 154 | | 'AUTHLIB_CONF_DIR' => null, |
|---|
| 155 | | 'CMD_MAKEUSERDB' => null, |
|---|
| 156 | | 'BACKUP_HOUR' => null, |
|---|
| 157 | | 'BACKUP_MINUTE' => null, |
|---|
| 158 | | 'BACKUP_ISPCP' => null, |
|---|
| 159 | | 'BACKUP_DOMAINS' => null, |
|---|
| 160 | | 'BACKUP_ROOT_DIR' => null, |
|---|
| 161 | | 'CMD_CRONTAB' => null, |
|---|
| 162 | | 'CMD_AMAVIS' => null, |
|---|
| 163 | | 'CMD_AUTHD' => null, |
|---|
| 164 | | 'CMD_FTPD' => null, |
|---|
| 165 | | 'CMD_HTTPD' => null, |
|---|
| 166 | | 'CMD_IMAP' => null, |
|---|
| 167 | | 'CMD_IMAP_SSL' => null, |
|---|
| 168 | | 'CMD_MTA' => null, |
|---|
| 169 | | 'CMD_NAMED' => null, |
|---|
| 170 | | 'CMD_POP' => null, |
|---|
| 171 | | 'CMD_POP_SSL' => null, |
|---|
| 172 | | 'CMD_ISPCPD' => null, |
|---|
| 173 | | 'CMD_ISPCPN' => null, |
|---|
| 174 | | 'CMD_PFLOGSUM' => null, |
|---|
| 175 | | 'TRAFF_LOG_DIR' => null, |
|---|
| 176 | | 'FTP_TRAFF_LOG' => null, |
|---|
| 177 | | 'MAIL_TRAFF_LOG' => null, |
|---|
| 178 | | 'PREV_TRAFF_LOG_MAX_SIZE' => null, |
|---|
| 179 | | 'TRAFF_ROOT_DIR' => null, |
|---|
| 180 | | 'TOOLS_ROOT_DIR' => null, |
|---|
| 181 | | 'QUOTA_ROOT_DIR' => null, |
|---|
| 182 | | 'MAIL_LOG_INC_AMAVIS' => null, |
|---|
| 183 | | 'USER_INITIAL_THEME' => null, |
|---|
| 184 | | 'ISPCP_LICENSE' => null, |
|---|
| 185 | | 'FTP_USERNAME_SEPARATOR' => null, |
|---|
| 186 | | 'FTP_HOMEDIR' => null, |
|---|
| 187 | | 'FTP_SHELL' => null, |
|---|
| 188 | | 'IPS_LOGO_PATH' => null, |
|---|
| 189 | | 'ISPCP_SUPPORT_SYSTEM_PATH' => null, |
|---|
| 190 | | 'ISPCP_SUPPORT_SYSTEM_TARGET' => null, |
|---|
| 191 | | 'MYSQL_PREFIX' => null, |
|---|
| 192 | | 'MYSQL_PREFIX_TYPE' => null, |
|---|
| 193 | | 'WEBMAIL_PATH' => null, |
|---|
| 194 | | 'WEBMAIL_TARGET' => null, |
|---|
| 195 | | 'PMA_PATH' => null, |
|---|
| 196 | | 'PMA_TARGET' => null, |
|---|
| 197 | | 'FILEMANAGER_PATH' => null, |
|---|
| 198 | | 'FILEMANAGER_TARGET' => null, |
|---|
| 199 | | 'DATE_FORMAT' => null, |
|---|
| 200 | | 'RKHUNTER_LOG' => null, |
|---|
| 201 | | 'CHKROOTKIT_LOG' => null, |
|---|
| 202 | | 'OTHER_ROOTKIT_LOG' => null, |
|---|
| 203 | | 'HTACCESS_USERS_FILE_NAME' => null, |
|---|
| 204 | | 'HTACCESS_GROUPS_FILE_NAME' => null, |
|---|
| 205 | | 'HTPASSWD_CMD' => null, |
|---|
| 206 | | 'BACKUP_FILE_DIR' => null, |
|---|
| 207 | | 'DEBUG' => null, |
|---|
| 208 | | ); |
|---|
| | 48 | 'BuildDate' => null, |
|---|
| | 49 | 'Version' => null, |
|---|
| | 50 | 'VersionH' => null, |
|---|
| | 51 | 'DEFAULT_ADMIN_ADDRESS' => null, |
|---|
| | 52 | 'SERVER_HOSTNAME' => null, |
|---|
| | 53 | 'BASE_SERVER_IP' => null, |
|---|
| | 54 | 'BASE_SERVER_VHOST' => null, |
|---|
| | 55 | 'MR_LOCK_FILE' => null, |
|---|
| | 56 | 'CMD_AWK' => null, |
|---|
| | 57 | 'CMD_BZCAT' => null, |
|---|
| | 58 | 'CMD_BZIP' => null, |
|---|
| | 59 | 'CMD_CHOWN' => null, |
|---|
| | 60 | 'CMD_CAT' => null, |
|---|
| | 61 | 'CMD_CHMOD' => null, |
|---|
| | 62 | 'CMD_CP' => null, |
|---|
| | 63 | 'CMD_DIFF' => null, |
|---|
| | 64 | 'CMD_DU' => null, |
|---|
| | 65 | 'CMD_ECHO' => null, |
|---|
| | 66 | 'CMD_GZCAT' => null, |
|---|
| | 67 | 'CMD_GZIP' => null, |
|---|
| | 68 | 'CMD_GREP' => null, |
|---|
| | 69 | 'CMD_GROUPADD' => null, |
|---|
| | 70 | 'CMD_GROUPDEL' => null, |
|---|
| | 71 | 'CMD_HOSTNAME' => null, |
|---|
| | 72 | 'CMD_IFCONFIG' => null, |
|---|
| | 73 | 'CMD_IPTABLES' => null, |
|---|
| | 74 | 'CMD_LN' => null, |
|---|
| | 75 | 'CMD_MYSQL' => null, |
|---|
| | 76 | 'CMD_MV' => null, |
|---|
| | 77 | 'CMD_PS' => null, |
|---|
| | 78 | 'CMD_RM' => null, |
|---|
| | 79 | 'CMD_SHELL' => null, |
|---|
| | 80 | 'CMD_TAR' => null, |
|---|
| | 81 | 'CMD_TOUCH' => null, |
|---|
| | 82 | 'CMD_USERADD' => null, |
|---|
| | 83 | 'CMD_USERDEL' => null, |
|---|
| | 84 | 'CMD_WC' => null, |
|---|
| | 85 | 'PEAR_DIR' => null, |
|---|
| | 86 | 'DATABASE_TYPE' => null, |
|---|
| | 87 | 'DATABASE_HOST' => null, |
|---|
| | 88 | 'DATABASE_NAME' => null, |
|---|
| | 89 | 'DATABASE_PASSWORD' => null, |
|---|
| | 90 | 'DATABASE_USER' => null, |
|---|
| | 91 | 'DATABASE_DIR' => null, |
|---|
| | 92 | 'CMD_MYSQLDUMP' => null, |
|---|
| | 93 | 'CONF_DIR' => null, |
|---|
| | 94 | 'LOG_DIR' => null, |
|---|
| | 95 | 'PHP_STARTER_DIR' => null, |
|---|
| | 96 | 'ROOT_DIR' => null, |
|---|
| | 97 | 'GUI_ROOT_DIR' => null, |
|---|
| | 98 | 'APACHE_WWW_DIR' => null, |
|---|
| | 99 | 'SCOREBOARDS_DIR' => null, |
|---|
| | 100 | 'ZIP' => null, |
|---|
| | 101 | 'PHP4_FASTCGI_BIN' => null, |
|---|
| | 102 | 'PHP5_FASTCGI_BIN' => null, |
|---|
| | 103 | 'PHP_VERSION' => null, |
|---|
| | 104 | 'FTPD_CONF_FILE' => null, |
|---|
| | 105 | 'BIND_CONF_FILE' => null, |
|---|
| | 106 | 'BIND_DB_DIR' => null, |
|---|
| | 107 | 'SECONDARY_DNS' => null, |
|---|
| | 108 | 'AWSTATS_ACTIVE' => null, |
|---|
| | 109 | 'AWSTATS_MODE' => null, |
|---|
| | 110 | 'AWSTATS_CACHE_DIR' => null, |
|---|
| | 111 | 'AWSTATS_CONFIG_DIR' => null, |
|---|
| | 112 | 'AWSTATS_ENGINE_DIR' => null, |
|---|
| | 113 | 'AWSTATS_WEB_DIR' => null, |
|---|
| | 114 | 'AWSTATS_ROOT_DIR' => null, |
|---|
| | 115 | 'APACHE_NAME' => null, |
|---|
| | 116 | 'APACHE_RESTART_TRY' => null, |
|---|
| | 117 | 'APACHE_CONF_DIR' => null, |
|---|
| | 118 | 'APACHE_CMD' => null, |
|---|
| | 119 | 'APACHE_LOG_DIR' => null, |
|---|
| | 120 | 'APACHE_BACKUP_LOG_DIR' => null, |
|---|
| | 121 | 'APACHE_USERS_LOG_DIR' => null, |
|---|
| | 122 | 'APACHE_MODS_DIR' => null, |
|---|
| | 123 | 'APACHE_SITES_DIR' => null, |
|---|
| | 124 | 'APACHE_CUSTOM_SITES_CONFIG_DIR' => null, |
|---|
| | 125 | 'APACHE_SUEXEC_USER_PREF' => null, |
|---|
| | 126 | 'APACHE_SUEXEC_MIN_GID' => null, |
|---|
| | 127 | 'APACHE_SUEXEC_MIN_UID' => null, |
|---|
| | 128 | 'APACHE_USER' => null, |
|---|
| | 129 | 'APACHE_GROUP' => null, |
|---|
| | 130 | 'POSTFIX_CONF_FILE' => null, |
|---|
| | 131 | 'POSTFIX_MASTER_CONF_FILE' => null, |
|---|
| | 132 | 'MTA_LOCAL_MAIL_DIR' => null, |
|---|
| | 133 | 'MTA_VIRTUAL_MAIL_DIR' => null, |
|---|
| | 134 | 'MTA_LOCAL_ALIAS_HASH' => null, |
|---|
| | 135 | 'MTA_VIRTUAL_CONF_DIR' => null, |
|---|
| | 136 | 'MTA_VIRTUAL_ALIAS_HASH' => null, |
|---|
| | 137 | 'MTA_VIRTUAL_DMN_HASH' => null, |
|---|
| | 138 | 'MTA_VIRTUAL_MAILBOX_HASH' => null, |
|---|
| | 139 | 'MTA_TRANSPORT_HASH' => null, |
|---|
| | 140 | 'MTA_SENDER_ACCESS_HASH' => null, |
|---|
| | 141 | 'MTA_MAILBOX_MIN_UID' => null, |
|---|
| | 142 | 'MTA_MAILBOX_UID' => null, |
|---|
| | 143 | 'MTA_MAILBOX_UID_NAME' => null, |
|---|
| | 144 | 'MTA_MAILBOX_GID' => null, |
|---|
| | 145 | 'MTA_MAILBOX_GID_NAME' => null, |
|---|
| | 146 | 'MTA_SASLDB_FILE' => null, |
|---|
| | 147 | 'ETC_SASLDB_FILE' => null, |
|---|
| | 148 | 'CMD_SASLDB_LISTUSERS2' => null, |
|---|
| | 149 | 'CMD_SASLDB_PASSWD2' => null, |
|---|
| | 150 | 'CMD_POSTMAP' => null, |
|---|
| | 151 | 'CMD_NEWALIASES' => null, |
|---|
| | 152 | 'COURIER_CONF_DIR' => null, |
|---|
| | 153 | 'AUTHLIB_CONF_DIR' => null, |
|---|
| | 154 | 'CMD_MAKEUSERDB' => null, |
|---|
| | 155 | 'BACKUP_HOUR' => null, |
|---|
| | 156 | 'BACKUP_MINUTE' => null, |
|---|
| | 157 | 'BACKUP_ISPCP' => null, |
|---|
| | 158 | 'BACKUP_DOMAINS' => null, |
|---|
| | 159 | 'BACKUP_ROOT_DIR' => null, |
|---|
| | 160 | 'CMD_CRONTAB' => null, |
|---|
| | 161 | 'CMD_AMAVIS' => null, |
|---|
| | 162 | 'CMD_AUTHD' => null, |
|---|
| | 163 | 'CMD_FTPD' => null, |
|---|
| | 164 | 'CMD_HTTPD' => null, |
|---|
| | 165 | 'CMD_IMAP' => null, |
|---|
| | 166 | 'CMD_IMAP_SSL' => null, |
|---|
| | 167 | 'CMD_MTA' => null, |
|---|
| | 168 | 'CMD_NAMED' => null, |
|---|
| | 169 | 'CMD_POP' => null, |
|---|
| | 170 | 'CMD_POP_SSL' => null, |
|---|
| | 171 | 'CMD_ISPCPD' => null, |
|---|
| | 172 | 'CMD_ISPCPN' => null, |
|---|
| | 173 | 'CMD_PFLOGSUM' => null, |
|---|
| | 174 | 'TRAFF_LOG_DIR' => null, |
|---|
| | 175 | 'FTP_TRAFF_LOG' => null, |
|---|
| | 176 | 'MAIL_TRAFF_LOG' => null, |
|---|
| | 177 | 'PREV_TRAFF_LOG_MAX_SIZE' => null, |
|---|
| | 178 | 'TRAFF_ROOT_DIR' => null, |
|---|
| | 179 | 'TOOLS_ROOT_DIR' => null, |
|---|
| | 180 | 'QUOTA_ROOT_DIR' => null, |
|---|
| | 181 | 'MAIL_LOG_INC_AMAVIS' => null, |
|---|
| | 182 | 'USER_INITIAL_THEME' => null, |
|---|
| | 183 | 'ISPCP_LICENSE' => null, |
|---|
| | 184 | 'FTP_USERNAME_SEPARATOR' => null, |
|---|
| | 185 | 'FTP_HOMEDIR' => null, |
|---|
| | 186 | 'FTP_SHELL' => null, |
|---|
| | 187 | 'IPS_LOGO_PATH' => null, |
|---|
| | 188 | 'ISPCP_SUPPORT_SYSTEM_PATH' => null, |
|---|
| | 189 | 'ISPCP_SUPPORT_SYSTEM_TARGET' => null, |
|---|
| | 190 | 'MYSQL_PREFIX' => null, |
|---|
| | 191 | 'MYSQL_PREFIX_TYPE' => null, |
|---|
| | 192 | 'WEBMAIL_PATH' => null, |
|---|
| | 193 | 'WEBMAIL_TARGET' => null, |
|---|
| | 194 | 'PMA_PATH' => null, |
|---|
| | 195 | 'PMA_TARGET' => null, |
|---|
| | 196 | 'FILEMANAGER_PATH' => null, |
|---|
| | 197 | 'FILEMANAGER_TARGET' => null, |
|---|
| | 198 | 'DATE_FORMAT' => null, |
|---|
| | 199 | 'RKHUNTER_LOG' => null, |
|---|
| | 200 | 'CHKROOTKIT_LOG' => null, |
|---|
| | 201 | 'OTHER_ROOTKIT_LOG' => null, |
|---|
| | 202 | 'HTACCESS_USERS_FILE_NAME' => null, |
|---|
| | 203 | 'HTACCESS_GROUPS_FILE_NAME' => null, |
|---|
| | 204 | 'HTPASSWD_CMD' => null, |
|---|
| | 205 | 'BACKUP_FILE_DIR' => null, |
|---|
| | 206 | 'DEBUG' => null, |
|---|
| | 207 | ); |
|---|
| 209 | 208 | var $status; |
|---|
| 210 | 209 | |
|---|
| … | … | |
| 221 | 220 | } |
|---|
| 222 | 221 | |
|---|
| 223 | | function parseFile(){ |
|---|
| | 222 | function parseFile() { |
|---|
| 224 | 223 | /* open file ... parse it and put it in $cfg_values */ |
|---|
| 225 | 224 | @$fd = fopen($this->config_file,'r'); |
|---|
| … | … | |
| 256 | 255 | } |
|---|
| 257 | 256 | } |
|---|
| 258 | | |
|---|
| 259 | | fclose($fd); |
|---|
| 260 | | foreach ($this->cfg_values as $k=>$v) { |
|---|
| 261 | | if ($v === null) { |
|---|
| 262 | | $this->status = "missing config variable: '$k'"; |
|---|
| 263 | | return FALSE; |
|---|
| 264 | | } |
|---|
| | 257 | fclose($fd); |
|---|
| | 258 | |
|---|
| | 259 | foreach ($this->cfg_values as $k=>$v) { |
|---|
| | 260 | if ($v === null) { |
|---|
| | 261 | $this->status = "missing config variable: '$k'"; |
|---|
| | 262 | return FALSE; |
|---|
| | 263 | } |
|---|
| | 264 | } |
|---|
| | 265 | |
|---|
| | 266 | return TRUE; |
|---|
| 265 | 267 | } |
|---|
| 266 | 268 | |
|---|
| 267 | | return TRUE; |
|---|
| 268 | | } |
|---|
| 269 | | |
|---|
| 270 | | function getValues() { |
|---|
| | 269 | function getValues() { |
|---|
| 271 | 270 | return $this->cfg_values; |
|---|
| 272 | 271 | } |
|---|
| … | … | |
| 282 | 281 | |
|---|
| 283 | 282 | $text = @base64_decode($db_pass."\n"); |
|---|
| 284 | | |
|---|
| 285 | 283 | /* Open the cipher */ |
|---|
| 286 | 284 | $td = @mcrypt_module_open ('blowfish', '', 'cbc', ''); |
|---|
| 287 | | |
|---|
| 288 | 285 | /* Create key */ |
|---|
| 289 | 286 | $key = $ispcp_db_pass_key; |
|---|
| 290 | | |
|---|
| 291 | 287 | /* Create the IV and determine the keysize length */ |
|---|
| 292 | 288 | $iv = $ispcp_db_pass_iv; |
|---|
| … | … | |
| 294 | 290 | /* Intialize encryption */ |
|---|
| 295 | 291 | @mcrypt_generic_init ($td, $key, $iv); |
|---|
| 296 | | |
|---|
| 297 | 292 | /* Decrypt encrypted string */ |
|---|
| 298 | 293 | $decrypted = @mdecrypt_generic ($td, $text); |
|---|
| 299 | | |
|---|
| 300 | 294 | @mcrypt_module_close ($td); |
|---|
| 301 | 295 | |
|---|
| … | … | |
| 304 | 298 | |
|---|
| 305 | 299 | } else { |
|---|
| 306 | | |
|---|
| 307 | 300 | system_message("ERROR: The php-extension 'mcrypt' not loaded !"); |
|---|
| 308 | | |
|---|
| 309 | 301 | die(); |
|---|
| 310 | | |
|---|
| 311 | 302 | } |
|---|
| 312 | 303 | |
|---|
| r776 |
r1003 |
|
| 1 | 1 | <?php |
|---|
| 2 | 2 | /** |
|---|
| 3 | | * ispCP (OMEGA) a Virtual Hosting Control Panel |
|---|
| | 3 | * ispCP ω (OMEGA) a Virtual Hosting Control System |
|---|
| 4 | 4 | * |
|---|
| 5 | | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| 7 | | * @link http://isp-control.net |
|---|
| 8 | | * @author ispCP Team (2007) |
|---|
| | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| | 7 | * @version SVN: $ID$ |
|---|
| | 8 | * @link http://isp-control.net |
|---|
| | 9 | * @author ispCP Team |
|---|
| 9 | 10 | * |
|---|
| 10 | | * @license |
|---|
| 11 | | * This program is free software; you can redistribute it and/or modify it under |
|---|
| 12 | | * the terms of the MPL General Public License as published by the Free Software |
|---|
| 13 | | * Foundation; either version 1.1 of the License, or (at your option) any later |
|---|
| 14 | | * version. |
|---|
| 15 | | * You should have received a copy of the MPL Mozilla Public License along with |
|---|
| 16 | | * this program; if not, write to the Open Source Initiative (OSI) |
|---|
| 17 | | * http://opensource.org | osi@opensource.org |
|---|
| 18 | | **/ |
|---|
| | 11 | * @license |
|---|
| | 12 | * This program is free software; you can redistribute it and/or modify it under |
|---|
| | 13 | * the terms of the MPL General Public License as published by the Free Software |
|---|
| | 14 | * Foundation; either version 1.1 of the License, or (at your option) any later |
|---|
| | 15 | * version. |
|---|
| | 16 | * You should have received a copy of the MPL Mozilla Public License along with |
|---|
| | 17 | * this program; if not, write to the Open Source Initiative (OSI) |
|---|
| | 18 | * http://opensource.org | osi@opensource.org |
|---|
| | 19 | */ |
|---|
| 19 | 20 | |
|---|
| 20 | 21 | function check_for_lock_file($wait_lock_timeout = 500000) { |
|---|
| … | … | |
| 275 | 276 | |
|---|
| 276 | 277 | function array_decode_idna($arr, $asPath = false) { |
|---|
| 277 | | |
|---|
| 278 | 278 | if ($asPath && !is_array($arr)) { |
|---|
| 279 | 279 | return implode('/', array_decode_idna(explode('/', $arr))); |
|---|
| r880 |
r1003 |
|
| 4 | 4 | * |
|---|
| 5 | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| | 7 | * @version SVN: $ID$ |
|---|
| 7 | 8 | * @link http://isp-control.net |
|---|
| 8 | | * @author ispCP Team (2007) |
|---|
| | 9 | * @author ispCP Team |
|---|
| 9 | 10 | * |
|---|
| 10 | 11 | * @license |
|---|
| … | … | |
| 23 | 24 | |
|---|
| 24 | 25 | $tpl = new pTemplate(); |
|---|
| 25 | | |
|---|
| 26 | 26 | $tpl->define_dynamic('page', $cfg['RESELLER_TEMPLATE_PATH'] . '/add_alias.tpl'); |
|---|
| 27 | 27 | $tpl->define_dynamic('page_message', 'page'); |
|---|
| … | … | |
| 118 | 118 | |
|---|
| 119 | 119 | function add_domain_alias(&$sql, &$err_al) { |
|---|
| 120 | | global $cr_user_id, $alias_name, $domain_ip, $forward, $mount_point; |
|---|
| | 120 | global $cr_user_id, $alias_name, $domain_ip, $forward, $mount_point, $cfg; |
|---|
| 121 | 121 | |
|---|
| 122 | 122 | $cr_user_id = $_POST['usraccounts']; |
|---|
| … | … | |
| 145 | 145 | } else if (!chk_mountp($mount_point) && $mount_point != '/') { |
|---|
| 146 | 146 | $err_al = tr("Incorrect mount point syntax"); |
|---|
| | 147 | } else if ($alias_name == $cfg['BASE_SERVER_VHOST']) { |
|---|
| | 148 | $err_al = tr('Master domain cannot be used!'); |
|---|
| 147 | 149 | } else if ($forward != 'no') { |
|---|
| 148 | | if (!chk_url($forward)) { |
|---|
| | 150 | if (!chk_forward_url($forward)) { |
|---|
| 149 | 151 | $err_al = tr("Incorrect forward syntax"); |
|---|
| 150 | 152 | } |
|---|
| | 153 | if (!preg_match("/\/$/", $forward)) { |
|---|
| | 154 | $forward .= "/"; |
|---|
| | 155 | } |
|---|
| 151 | 156 | } else { |
|---|
| 152 | 157 | // now lets fix the mountpoint |
|---|
| r805 |
r1003 |
|
| 4 | 4 | * |
|---|
| 5 | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| 7 | 7 | * @version SVN: $ID$ |
|---|
| 8 | 8 | * @link http://isp-control.net |
|---|
| 9 | | * @author ispCP Team (2007) |
|---|
| | 9 | * @author ispCP Team |
|---|
| 10 | 10 | * |
|---|
| 11 | 11 | * @license |
|---|
| … | … | |
| 189 | 189 | |
|---|
| 190 | 190 | if ($forward_url != 'no') { |
|---|
| 191 | | // @todo check chk_url |
|---|
| 192 | | if (!chk_url($forward_url)) { |
|---|
| | 191 | if (!chk_forward_url($forward_url)) { |
|---|
| 193 | 192 | $ed_error = tr("Incorrect forward syntax"); |
|---|
| 194 | 193 | } |
|---|
| | 194 | if (!preg_match("/\/$/", $forward_url)) { |
|---|
| | 195 | $forward_url .= "/"; |
|---|
| | 196 | } |
|---|
| 195 | 197 | } |
|---|
| 196 | 198 | |
|---|
| r811 |
r1003 |
|
| 4 | 4 | * |
|---|
| 5 | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| | 7 | * @version SVN: $ID$ |
|---|
| 7 | 8 | * @link http://isp-control.net |
|---|
| 8 | | * @author ispCP Team (2007) |
|---|
| | 9 | * @author ispCP Team |
|---|
| 9 | 10 | * |
|---|
| 10 | 11 | * @license |
|---|
| … | … | |
| 111 | 112 | } else if (ispcp_domain_exists($dmn_name, $_SESSION['user_id'])) { |
|---|
| 112 | 113 | $even_txt = tr('Domain with that name already exists on the system!'); |
|---|
| | 114 | } else if ($dmn_name == $cfg['BASE_SERVER_VHOST']) { |
|---|
| | 115 | $even_txt = tr('Master domain cannot be used!'); |
|---|
| 113 | 116 | } |
|---|
|