Changeset 1272

Show
Ignore:
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
  • trunk/CHANGELOG

    r1271 r1272  
    11ispCP ω 1.0.0 Changelog 
    22~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     3 
     42008-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 
    313 
    4142008-07-12 Marc Pujol 
  • trunk/engine/setup/vhcs2.4.7-ispcp.sql

    r1206 r1272  
    8888DROP TABLE IF EXISTS `lang_Deutsch`; 
    8989DROP TABLE IF EXISTS `lang_Dutch`; 
    90 -- English Translation is up to date after install 
    91 -- DROP TABLE IF EXISTS `lang_English`; 
     90DROP TABLE IF EXISTS `lang_English`; 
    9291DROP TABLE IF EXISTS `lang_Finnish`; 
    9392DROP TABLE IF EXISTS `lang_French`; 
  • trunk/engine/setup/vhcs2.4.8-ispcp.sql

    r1206 r1272  
    5656DROP TABLE IF EXISTS `lang_Deutsch`; 
    5757DROP TABLE IF EXISTS `lang_Dutch`; 
    58 -- English Translation is up to date after install 
    59 -- DROP TABLE IF EXISTS `lang_English`; 
     58DROP TABLE IF EXISTS `lang_English`; 
    6059DROP TABLE IF EXISTS `lang_Finnish`; 
    6160DROP TABLE IF EXISTS `lang_French`; 
  • trunk/gui/client/mail_accounts.php

    r1265 r1272  
    381381// static page messages. 
    382382 
    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'); 
     383gen_client_mainmenu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/main_menu_email_accounts.tpl'); 
     384gen_client_menu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/menu_email_accounts.tpl'); 
    385385 
    386386gen_logged_from($tpl); 
  • trunk/gui/client/mail_add.php

    r1265 r1272  
    133133            $rs->MoveNext(); 
    134134 
    135             if (!$first_passed) $first_passed = true; 
     135            if (!$first_passed) 
     136                                $first_passed = true; 
    136137        } 
    137138    } 
     
    264265                        } else { 
    265266                                set_page_message(tr('Unknown domain type')); 
    266                                 return
     267                                return false
    267268                        } 
    268269                } 
     
    280281                        } else { 
    281282                                set_page_message(tr('Unknown domain type')); 
    282                                 return
     283                                return false
    283284                        } 
    284285 
     
    296297                                        /* ERR .. strange :) not email in this line - warning */ 
    297298                                        set_page_message(tr("Mailformat of an address in your forward list is incorrect!")); 
    298                                         return
     299                                        return false
    299300                                } else if ($value === '') { 
    300301                                        set_page_message(tr("Mail forward list empty!")); 
    301                                         return
     302                                        return false
    302303                                } 
    303304                                $mail_accs[] = $value; 
     
    329330    if ($rs->fields['cnt'] > 0) { 
    330331        set_page_message(tr('Mail account already exists!')); 
    331         return
     332        return false
    332333    } 
    333334 
     
    375376        if (($mail_type_normal == false) && ($mail_type_forward == false)) { 
    376377                set_page_message(tr('Please select at least one mail type!')); 
    377                 return
     378                return false
    378379        } 
    379380 
    380381    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']); 
    383384    } 
    384385 
    385386    if (!isset($_POST['username']) || $_POST['username'] === '') { 
    386387        set_page_message(tr('Please enter mail account username!')); 
    387         return
     388        return false
    388389    } 
    389390 
    390391    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) === '') { 
    392393            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 
    402400            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
    404402        } 
    405403    } 
     
    407405    if ($_POST['dmn_type'] === 'sub' && !isset($_POST['sub_id'])) { 
    408406        set_page_message(tr('Subdomain list is empty! You cannot add mail accounts!')); 
    409         return
     407        return false
    410408    } 
    411409 
    412410    if ($_POST['dmn_type'] === 'als' && !isset($_POST['als_id'])) { 
    413411        set_page_message(tr('Alias list is empty! You cannot add mail accounts!')); 
    414         return
     412        return false
    415413    } 
    416414 
    417415    if ($mail_type_forward && empty($_POST['forward_list'])) { 
    418416        set_page_message(tr('Forward list is empty!')); 
    419         return
     417        return false
    420418    } 
    421419 
     
    554552$tpl->prnt(); 
    555553 
    556 if (Config::get('DUMP_GUI_DEBUG')) dump_gui_debug(); 
     554if (Config::get('DUMP_GUI_DEBUG')) 
     555        dump_gui_debug(); 
    557556 
    558557?> 
  • trunk/gui/client/mail_edit.php

    r1265 r1272  
    173173        } 
    174174 
    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']); 
    177177        $mail_id = $_GET['id']; 
    178178        $mail_account = clean_input($_POST['mail_account']); 
    179179 
    180180        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!')); 
    182182                return false; 
    183183        } else if ($pass !== $pass_rep) { 
    184184                set_page_message(tr('Entered passwords differ!')); 
    185185                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')); 
    188188                return false; 
    189189        } else { 
     
    334334$tpl->prnt(); 
    335335 
    336 if (Config::get('DUMP_GUI_DEBUG')) dump_gui_debug(); 
     336if (Config::get('DUMP_GUI_DEBUG')) 
     337        dump_gui_debug(); 
    337338 
    338339unset_messages(); 
  • trunk/gui/client/sql_database_add.php

    r1268 r1272  
    196196add_sql_database($sql, $_SESSION['user_id']); 
    197197 
    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'); 
     198gen_client_mainmenu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/main_menu_manage_sql.tpl'); 
     199gen_client_menu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/menu_manage_sql.tpl'); 
    200200 
    201201gen_logged_from($tpl); 
  • trunk/gui/client/subdomain_add.php

    r1265 r1272  
    249249// static page messages. 
    250250 
    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'); 
     251gen_client_mainmenu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/main_menu_manage_domains.tpl'); 
     252gen_client_menu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/menu_manage_domains.tpl'); 
    253253 
    254254gen_logged_from($tpl); 
  • trunk/gui/client/webtools.php

    r1245 r1272  
    2727$tpl->define_dynamic('page_message', 'page'); 
    2828$tpl->define_dynamic('active_awstats', 'page'); 
     29$tpl->define_dynamic('active_email', 'page'); 
    2930$tpl->define_dynamic('logged_from', 'page'); 
    3031 
     
    3940                ) 
    4041        ); 
     42 
     43// Check, if E-Mail is active for this user 
     44list($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 
     49if ($dmn_mailacc_limit == -1) 
     50        $tpl->assign('ACTIVE_EMAIL', ''); 
    4151 
    4252function gen_page_awstats(&$tpl) { 
  • trunk/gui/include/client-functions.php

    r1264 r1272  
    582582        } 
    583583 
     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 
    584591        if (Config::get('AWSTATS_ACTIVE') == 'yes') { 
    585592                $tpl->assign('ACTIVE_AWSTSTS', ''); 
  • trunk/gui/include/input-checks.php

    r1252 r1272  
    133133 * @param       int             $num            number of max. chars 
    134134 * @param       String  $permitted      RegExp of permitted chars 
    135  * @return      boolean                         valid username or not 
     135 * @return      boolean                         valid password or not 
    136136 */ 
    137137function chk_password($password, $num = 50, $permitted = "") { 
  • trunk/gui/themes/omega_original/admin/reseller_statistics.tpl

    r1264 r1272  
    8585                            <tr> 
    8686                              <td nowrap="nowrap" align="center">&nbsp;</td> 
    87                               <td class="{ITEM_CLASS}" nowrap="nowrap" align="center"><b><a href="user_statistics.php?rid={RESELLER_ID}&amp;name={RESELLER_NAME}&amp;month={MONTH}&amp;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}&amp;name={RESELLER_NAME}&amp;month={MONTH}&amp;year={YEAR}" title="{RESELLER_NAME}" class="link">{RESELLER_NAME}</a></b></td> 
    8888                              <td class="{ITEM_CLASS}" nowrap="nowrap" align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> 
    8989                                  <tr> 
  • trunk/gui/themes/omega_original/client/menu_webtools.tpl

    r1263 r1272  
    4343    <td height="3" width="193"><img src="{THEME_COLOR_PATH}/images/top/menu_separator.jpg" height="3" width="193" /></td> 
    4444  </tr> 
     45  <!-- BDP: active_awstats --> 
    4546    <tr> 
    4647    <td><a href="{WEBMAIL_PATH}" target="{WEBMAIL_TARGET}" class="submenu">{TR_WEBMAIL}</a></td> 
     
    4950    <td height="3" width="193"><img src="{THEME_COLOR_PATH}/images/top/menu_separator.jpg" height="3" width="193" /></td> 
    5051  </tr> 
     52  <!-- EDP: active_awstats --> 
    5153    <tr> 
    5254    <td><a href="{FILEMANAGER_PATH}" target="{FILEMANAGER_TARGET}" class="submenu">{TR_FILEMANAGER}</a></td> 
  • trunk/gui/themes/omega_original/client/webtools.tpl

    r1248 r1272  
    7373              </table></td> 
    7474            </tr> 
     75            <!-- BDP: active_email --> 
    7576            <tr> 
    7677             <td>&nbsp;</td> 
     
    8384              </table></td> 
    8485            </tr> 
     86            <!-- EDP: active_email --> 
    8587            <tr> 
    8688             <td>&nbsp;</td>