Changeset 1272
- Timestamp:
- 07/16/08 00:53:08
(2 months ago)
- Author:
- rats
- Message:
* Fixed #1358: Webmail link in tools should be hidden if domain has no mail
* Fixed #1400: error in manage_users.php (left menu)
* Fixed #1412: Some pages are not working with latest trunk
* Fixed #1413: Editing e-mail account: new password is shell-escaped
* Fixed #1414: SMTP AUTH not working with password, that contains a dollar sign
* Fixed #1395: vhcs2.4.7-ispcp.sql / ispc-update - default language not migrated
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1271 |
r1272 |
|
| 1 | 1 | ispCP ω 1.0.0 Changelog |
|---|
| 2 | 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| | 3 | |
|---|
| | 4 | 2008-07-16 Benedikt Heintel |
|---|
| | 5 | - GUI: |
|---|
| | 6 | * Fixed #1358: Webmail link in tools should be hidden if domain has no mail |
|---|
| | 7 | * Fixed #1400: error in manage_users.php (left menu) |
|---|
| | 8 | * Fixed #1412: Some pages are not working with latest trunk |
|---|
| | 9 | * Fixed #1413: Editing e-mail account: new password is shell-escaped |
|---|
| | 10 | * Fixed #1414: SMTP AUTH not working with password, that contains a dollar sign |
|---|
| | 11 | - SETUP: |
|---|
| | 12 | * Fixed #1395: vhcs2.4.7-ispcp.sql / ispc-update - default language not migrated |
|---|
| 3 | 13 | |
|---|
| 4 | 14 | 2008-07-12 Marc Pujol |
|---|
| r1206 |
r1272 |
|
| 88 | 88 | DROP TABLE IF EXISTS `lang_Deutsch`; |
|---|
| 89 | 89 | DROP TABLE IF EXISTS `lang_Dutch`; |
|---|
| 90 | | -- English Translation is up to date after install |
|---|
| 91 | | -- DROP TABLE IF EXISTS `lang_English`; |
|---|
| | 90 | DROP TABLE IF EXISTS `lang_English`; |
|---|
| 92 | 91 | DROP TABLE IF EXISTS `lang_Finnish`; |
|---|
| 93 | 92 | DROP TABLE IF EXISTS `lang_French`; |
|---|
| r1206 |
r1272 |
|
| 56 | 56 | DROP TABLE IF EXISTS `lang_Deutsch`; |
|---|
| 57 | 57 | DROP TABLE IF EXISTS `lang_Dutch`; |
|---|
| 58 | | -- English Translation is up to date after install |
|---|
| 59 | | -- DROP TABLE IF EXISTS `lang_English`; |
|---|
| | 58 | DROP TABLE IF EXISTS `lang_English`; |
|---|
| 60 | 59 | DROP TABLE IF EXISTS `lang_Finnish`; |
|---|
| 61 | 60 | DROP TABLE IF EXISTS `lang_French`; |
|---|
| r1265 |
r1272 |
|
| 381 | 381 | // static page messages. |
|---|
| 382 | 382 | |
|---|
| 383 | | gen_client_mainmenu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/main_menu_mail_accounts.tpl'); |
|---|
| 384 | | gen_client_menu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/menu_mail_accounts.tpl'); |
|---|
| | 383 | gen_client_mainmenu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/main_menu_email_accounts.tpl'); |
|---|
| | 384 | gen_client_menu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/menu_email_accounts.tpl'); |
|---|
| 385 | 385 | |
|---|
| 386 | 386 | gen_logged_from($tpl); |
|---|
| r1265 |
r1272 |
|
| 133 | 133 | $rs->MoveNext(); |
|---|
| 134 | 134 | |
|---|
| 135 | | if (!$first_passed) $first_passed = true; |
|---|
| | 135 | if (!$first_passed) |
|---|
| | 136 | $first_passed = true; |
|---|
| 136 | 137 | } |
|---|
| 137 | 138 | } |
|---|
| … | … | |
| 264 | 265 | } else { |
|---|
| 265 | 266 | set_page_message(tr('Unknown domain type')); |
|---|
| 266 | | return ; |
|---|
| | 267 | return false; |
|---|
| 267 | 268 | } |
|---|
| 268 | 269 | } |
|---|
| … | … | |
| 280 | 281 | } else { |
|---|
| 281 | 282 | set_page_message(tr('Unknown domain type')); |
|---|
| 282 | | return; |
|---|
| | 283 | return false; |
|---|
| 283 | 284 | } |
|---|
| 284 | 285 | |
|---|
| … | … | |
| 296 | 297 | /* ERR .. strange :) not email in this line - warning */ |
|---|
| 297 | 298 | set_page_message(tr("Mailformat of an address in your forward list is incorrect!")); |
|---|
| 298 | | return; |
|---|
| | 299 | return false; |
|---|
| 299 | 300 | } else if ($value === '') { |
|---|
| 300 | 301 | set_page_message(tr("Mail forward list empty!")); |
|---|
| 301 | | return; |
|---|
| | 302 | return false; |
|---|
| 302 | 303 | } |
|---|
| 303 | 304 | $mail_accs[] = $value; |
|---|
| … | … | |
| 329 | 330 | if ($rs->fields['cnt'] > 0) { |
|---|
| 330 | 331 | set_page_message(tr('Mail account already exists!')); |
|---|
| 331 | | return; |
|---|
| | 332 | return false; |
|---|
| 332 | 333 | } |
|---|
| 333 | 334 | |
|---|
| … | … | |
| 375 | 376 | if (($mail_type_normal == false) && ($mail_type_forward == false)) { |
|---|
| 376 | 377 | set_page_message(tr('Please select at least one mail type!')); |
|---|
| 377 | | return; |
|---|
| | 378 | return false; |
|---|
| 378 | 379 | } |
|---|
| 379 | 380 | |
|---|
| 380 | 381 | if ($mail_type_normal) { |
|---|
| 381 | | $pass = escapeshellcmd($_POST['pass']); |
|---|
| 382 | | $pass_rep = escapeshellcmd($_POST['pass_rep']); |
|---|
| | 382 | $pass = clean_input($_POST['pass']); |
|---|
| | 383 | $pass_rep = clean_input($_POST['pass_rep']); |
|---|
| 383 | 384 | } |
|---|
| 384 | 385 | |
|---|
| 385 | 386 | if (!isset($_POST['username']) || $_POST['username'] === '') { |
|---|
| 386 | 387 | set_page_message(tr('Please enter mail account username!')); |
|---|
| 387 | | return; |
|---|
| | 388 | return false; |
|---|
| 388 | 389 | } |
|---|
| 389 | 390 | |
|---|
| 390 | 391 | if ($mail_type_normal) { |
|---|
| 391 | | if (!isset($pass) || $pass == null || !isset($pass_rep) || $pass_rep == null || $pass_rep == '' || $pass == '') { |
|---|
| | 392 | if (trim($pass) === '' || trim($pass_rep) === '') { |
|---|
| 392 | 393 | set_page_message(tr('Password data is missing!')); |
|---|
| 393 | | return; |
|---|
| 394 | | } |
|---|
| 395 | | |
|---|
| 396 | | if ($pass !== $pass_rep) { |
|---|
| 397 | | set_page_message(tr('Entered passwords differ from the another!')); |
|---|
| 398 | | return; |
|---|
| 399 | | } |
|---|
| 400 | | // Not permitted chars |
|---|
| 401 | | if (!chk_password($pass)) { |
|---|
| | 394 | return false; |
|---|
| | 395 | } else if ($pass !== $pass_rep) { |
|---|
| | 396 | set_page_message(tr('Entered passwords differ!')); |
|---|
| | 397 | return false; |
|---|
| | 398 | } else if (!chk_password($pass, 50, "/[`\xb4'\"\\\\\x01-\x1f\015\012|<>^$]/i")) { |
|---|
| | 399 | // Not permitted chars |
|---|
| 402 | 400 | set_page_message(tr('Password data is shorter than %s signs or includes not permitted signs!'), Config::get('PASSWD_CHARS')); |
|---|
| 403 | | return; |
|---|
| | 401 | return false; |
|---|
| 404 | 402 | } |
|---|
| 405 | 403 | } |
|---|
| … | … | |
| 407 | 405 | if ($_POST['dmn_type'] === 'sub' && !isset($_POST['sub_id'])) { |
|---|
| 408 | 406 | set_page_message(tr('Subdomain list is empty! You cannot add mail accounts!')); |
|---|
| 409 | | return; |
|---|
| | 407 | return false; |
|---|
| 410 | 408 | } |
|---|
| 411 | 409 | |
|---|
| 412 | 410 | if ($_POST['dmn_type'] === 'als' && !isset($_POST['als_id'])) { |
|---|
| 413 | 411 | set_page_message(tr('Alias list is empty! You cannot add mail accounts!')); |
|---|
| 414 | | return; |
|---|
| | 412 | return false; |
|---|
| 415 | 413 | } |
|---|
| 416 | 414 | |
|---|
| 417 | 415 | if ($mail_type_forward && empty($_POST['forward_list'])) { |
|---|
| 418 | 416 | set_page_message(tr('Forward list is empty!')); |
|---|
| 419 | | return; |
|---|
| | 417 | return false; |
|---|
| 420 | 418 | } |
|---|
| 421 | 419 | |
|---|
| … | … | |
| 554 | 552 | $tpl->prnt(); |
|---|
| 555 | 553 | |
|---|
| 556 | | if (Config::get('DUMP_GUI_DEBUG')) dump_gui_debug(); |
|---|
| | 554 | if (Config::get('DUMP_GUI_DEBUG')) |
|---|
| | 555 | dump_gui_debug(); |
|---|
| 557 | 556 | |
|---|
| 558 | 557 | ?> |
|---|
| r1265 |
r1272 |
|
| 173 | 173 | } |
|---|
| 174 | 174 | |
|---|
| 175 | | $pass = escapeshellcmd($_POST['pass']); |
|---|
| 176 | | $pass_rep = escapeshellcmd($_POST['pass_rep']); |
|---|
| | 175 | $pass = clean_input($_POST['pass']); |
|---|
| | 176 | $pass_rep = clean_input($_POST['pass_rep']); |
|---|
| 177 | 177 | $mail_id = $_GET['id']; |
|---|
| 178 | 178 | $mail_account = clean_input($_POST['mail_account']); |
|---|
| 179 | 179 | |
|---|
| 180 | 180 | if (trim($pass) === '' || trim($pass_rep) === '' || $mail_id === '' || !is_numeric($mail_id)) { |
|---|
| 181 | | set_page_message(tr('Missing or wrong data!')); |
|---|
| | 181 | set_page_message(tr('Password data is missing!')); |
|---|
| 182 | 182 | return false; |
|---|
| 183 | 183 | } else if ($pass !== $pass_rep) { |
|---|
| 184 | 184 | set_page_message(tr('Entered passwords differ!')); |
|---|
| 185 | 185 | return false; |
|---|
| 186 | | } else if (preg_match("/[`\xb4'\"\\\\\x01-\x1f\015\012|<>^]/i", $pass)) { // Not permitted chars |
|---|
| 187 | | set_page_message(tr('Password data includes not valid signs!')); |
|---|
| | 186 | } else if (!chk_password($pass, 50, "/[`\xb4'\"\\\\\x01-\x1f\015\012|<>^$]/i")) { // Not permitted chars |
|---|
| | 187 | set_page_message(tr('Password data is shorter than %s signs or includes not permitted signs!'), Config::get('PASSWD_CHARS')); |
|---|
| 188 | 188 | return false; |
|---|
| 189 | 189 | } else { |
|---|
| … | … | |
| 334 | 334 | $tpl->prnt(); |
|---|
| 335 | 335 | |
|---|
| 336 | | if (Config::get('DUMP_GUI_DEBUG')) dump_gui_debug(); |
|---|
| | 336 | if (Config::get('DUMP_GUI_DEBUG')) |
|---|
| | 337 | dump_gui_debug(); |
|---|
| 337 | 338 | |
|---|
| 338 | 339 | unset_messages(); |
|---|
| r1268 |
r1272 |
|
| 196 | 196 | add_sql_database($sql, $_SESSION['user_id']); |
|---|
| 197 | 197 | |
|---|
| 198 | | gen_client_mainmenu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/main_menu_sql_manage.tpl'); |
|---|
| 199 | | gen_client_menu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/menu_sql_manage.tpl'); |
|---|
| | 198 | gen_client_mainmenu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/main_menu_manage_sql.tpl'); |
|---|
| | 199 | gen_client_menu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/menu_manage_sql.tpl'); |
|---|
| 200 | 200 | |
|---|
| 201 | 201 | gen_logged_from($tpl); |
|---|
| r1265 |
r1272 |
|
| 249 | 249 | // static page messages. |
|---|
| 250 | 250 | |
|---|
| 251 | | gen_client_mainmenu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/main_menu_domains_manage.tpl'); |
|---|
| 252 | | gen_client_menu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/menu_domains_manage.tpl'); |
|---|
| | 251 | gen_client_mainmenu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/main_menu_manage_domains.tpl'); |
|---|
| | 252 | gen_client_menu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/menu_manage_domains.tpl'); |
|---|
| 253 | 253 | |
|---|
| 254 | 254 | gen_logged_from($tpl); |
|---|
| r1245 |
r1272 |
|
| 27 | 27 | $tpl->define_dynamic('page_message', 'page'); |
|---|
| 28 | 28 | $tpl->define_dynamic('active_awstats', 'page'); |
|---|
| | 29 | $tpl->define_dynamic('active_email', 'page'); |
|---|
| 29 | 30 | $tpl->define_dynamic('logged_from', 'page'); |
|---|
| 30 | 31 | |
|---|
| … | … | |
| 39 | 40 | ) |
|---|
| 40 | 41 | ); |
|---|
| | 42 | |
|---|
| | 43 | // Check, if E-Mail is active for this user |
|---|
| | 44 | list($dmn_id, $dmn_name, $dmn_gid, $dmn_uid, $dmn_created_id, $dmn_created, $dmn_last_modified, |
|---|
| | 45 | $dmn_mailacc_limit, $dmn_ftpacc_limit, $dmn_traff_limit, $dmn_sqld_limit, $dmn_sqlu_limit, |
|---|
| | 46 | $dmn_status, $dmn_als_limit, $dmn_subd_limit, $dmn_ip_id, $dmn_disk_limit, $dmn_disk_usage, |
|---|
| | 47 | $dmn_php, $dmn_cgi) = get_domain_default_props($sql, $_SESSION['user_id']); |
|---|
| | 48 | |
|---|
| | 49 | if ($dmn_mailacc_limit == -1) |
|---|
| | 50 | $tpl->assign('ACTIVE_EMAIL', ''); |
|---|
| 41 | 51 | |
|---|
| 42 | 52 | function gen_page_awstats(&$tpl) { |
|---|
| r1264 |
r1272 |
|
| 582 | 582 | } |
|---|
| 583 | 583 | |
|---|
| | 584 | list($dmn_id, $dmn_name, $dmn_gid, $dmn_uid, $dmn_created_id, $dmn_created, $dmn_last_modified, |
|---|
| | 585 | $dmn_mailacc_limit, $dmn_ftpacc_limit, $dmn_traff_limit, $dmn_sqld_limit, $dmn_sqlu_limit, |
|---|
| | 586 | $dmn_status, $dmn_als_limit, $dmn_subd_limit, $dmn_ip_id, $dmn_disk_limit, $dmn_disk_usage, |
|---|
| | 587 | $dmn_php, $dmn_cgi) = get_domain_default_props($sql, $_SESSION['user_id']); |
|---|
| | 588 | |
|---|
| | 589 | if ($dmn_mailacc_limit == -1) $tpl->assign('ACTIVE_EMAIL', ''); |
|---|
| | 590 | |
|---|
| 584 | 591 | if (Config::get('AWSTATS_ACTIVE') == 'yes') { |
|---|
| 585 | 592 | $tpl->assign('ACTIVE_AWSTSTS', ''); |
|---|
| r1252 |
r1272 |
|
| 133 | 133 | * @param int $num number of max. chars |
|---|
| 134 | 134 | * @param String $permitted RegExp of permitted chars |
|---|
| 135 | | * @return boolean valid username or not |
|---|
| | 135 | * @return boolean valid password or not |
|---|
| 136 | 136 | */ |
|---|
| 137 | 137 | function chk_password($password, $num = 50, $permitted = "") { |
|---|
| r1264 |
r1272 |
|
| 85 | 85 | <tr> |
|---|
| 86 | 86 | <td nowrap="nowrap" align="center"> </td> |
|---|
| 87 | | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center"><b><a href="user_statistics.php?rid={RESELLER_ID}&name={RESELLER_NAME}&month={MONTH}&year={YEAR}" title="{RESELLER_NAME}" class="link">{RESELLER_NAME}</a></b></td> |
|---|
| | 87 | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center"><b><a href="reseller_statistics.php?rid={RESELLER_ID}&name={RESELLER_NAME}&month={MONTH}&year={YEAR}" title="{RESELLER_NAME}" class="link">{RESELLER_NAME}</a></b></td> |
|---|
| 88 | 88 | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> |
|---|
| 89 | 89 | <tr> |
|---|
| r1263 |
r1272 |
|
| 43 | 43 | <td height="3" width="193"><img src="{THEME_COLOR_PATH}/images/top/menu_separator.jpg" height="3" width="193" /></td> |
|---|
| 44 | 44 | </tr> |
|---|
| | 45 | <!-- BDP: active_awstats --> |
|---|
| 45 | 46 | <tr> |
|---|
| 46 | 47 | <td><a href="{WEBMAIL_PATH}" target="{WEBMAIL_TARGET}" class="submenu">{TR_WEBMAIL}</a></td> |
|---|
| … | … | |
| 49 | 50 | <td height="3" width="193"><img src="{THEME_COLOR_PATH}/images/top/menu_separator.jpg" height="3" width="193" /></td> |
|---|
| 50 | 51 | </tr> |
|---|
| | 52 | <!-- EDP: active_awstats --> |
|---|
| 51 | 53 | <tr> |
|---|
| 52 | 54 | <td><a href="{FILEMANAGER_PATH}" target="{FILEMANAGER_TARGET}" class="submenu">{TR_FILEMANAGER}</a></td> |
|---|
| r1248 |
r1272 |
|
| 73 | 73 | </table></td> |
|---|
| 74 | 74 | </tr> |
|---|
| | 75 | <!-- BDP: active_email --> |
|---|
| 75 | 76 | <tr> |
|---|
| 76 | 77 | <td> </td> |
|---|
| … | … | |
| 83 | 84 | </table></td> |
|---|
| 84 | 85 | </tr> |
|---|
| | 86 | <!-- EDP: active_email --> |
|---|
| 85 | 87 | <tr> |
|---|
| 86 | 88 | <td> </td> |
|---|
|