Changeset 1206

Show
Ignore:
Timestamp:
06/13/08 23:16:11 (4 months ago)
Author:
rats
Message:

* Fixed 1346: client mysql password length
* Fixed #1215: POP/IMAP traffic is not added in domain statistics with courier and fedora core 8
* Fixed #1345: Bug in mail log collection (ispcp-vrl-traff)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG

    r1205 r1206  
    11ispCP ω 1.0.0 Changelog 
    22~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     3 
     42008-06-13 Benedikt Heintel 
     5        - DATABASES: 
     6                * Fixed 1346: client mysql password length 
     7        - ENGINE: 
     8                * Fixed #1215: POP/IMAP traffic is not added in domain statistics with courier and fedora core 8 
     9                * Fixed #1345: Bug in mail log collection (ispcp-vrl-traff) 
    310 
    4112008-06-12 Benedikt Heintel 
  • trunk/configs/centos/database/database.sql

    r1129 r1206  
    523523  `sqlu_id` int(10) unsigned NOT NULL auto_increment, 
    524524  `sqld_id` int(10) unsigned DEFAULT '0', 
    525   `sqlu_name` varchar(16) binary DEFAULT 'n/a', 
    526   `sqlu_pass` varchar(16) binary DEFAULT 'n/a', 
     525  `sqlu_name` varchar(64) binary DEFAULT 'n/a', 
     526  `sqlu_pass` varchar(64) binary DEFAULT 'n/a', 
    527527  UNIQUE KEY (`sqlu_id`) 
    528528) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; 
  • trunk/configs/debian/database/database.sql

    r1129 r1206  
    523523  `sqlu_id` int(10) unsigned NOT NULL auto_increment, 
    524524  `sqld_id` int(10) unsigned DEFAULT '0', 
    525   `sqlu_name` varchar(16) binary DEFAULT 'n/a', 
    526   `sqlu_pass` varchar(16) binary DEFAULT 'n/a', 
     525  `sqlu_name` varchar(64) binary DEFAULT 'n/a', 
     526  `sqlu_pass` varchar(64) binary DEFAULT 'n/a', 
    527527  UNIQUE KEY (`sqlu_id`) 
    528 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2
     528) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2
    529529 
    530530-- -------------------------------------------------------- 
  • trunk/configs/fedora/database/database.sql

    r1129 r1206  
    523523  `sqlu_id` int(10) unsigned NOT NULL auto_increment, 
    524524  `sqld_id` int(10) unsigned DEFAULT '0', 
    525   `sqlu_name` varchar(16) binary DEFAULT 'n/a', 
    526   `sqlu_pass` varchar(16) binary DEFAULT 'n/a', 
     525  `sqlu_name` varchar(64) binary DEFAULT 'n/a', 
     526  `sqlu_pass` varchar(64) binary DEFAULT 'n/a', 
    527527  UNIQUE KEY (`sqlu_id`) 
    528528) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; 
  • trunk/configs/freebsd/database/database.sql

    r1129 r1206  
    523523  `sqlu_id` int(10) unsigned NOT NULL auto_increment, 
    524524  `sqld_id` int(10) unsigned DEFAULT '0', 
    525   `sqlu_name` varchar(16) binary DEFAULT 'n/a', 
    526   `sqlu_pass` varchar(16) binary DEFAULT 'n/a', 
     525  `sqlu_name` varchar(64) binary DEFAULT 'n/a', 
     526  `sqlu_pass` varchar(64) binary DEFAULT 'n/a', 
    527527  UNIQUE KEY (`sqlu_id`) 
    528528) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; 
  • trunk/configs/gentoo/database/database.sql

    r1134 r1206  
    523523  `sqlu_id` int(10) unsigned NOT NULL auto_increment, 
    524524  `sqld_id` int(10) unsigned DEFAULT '0', 
    525   `sqlu_name` varchar(16) binary DEFAULT 'n/a', 
    526   `sqlu_pass` varchar(16) binary DEFAULT 'n/a', 
     525  `sqlu_name` varchar(64) binary DEFAULT 'n/a', 
     526  `sqlu_pass` varchar(64) binary DEFAULT 'n/a', 
    527527  UNIQUE KEY (`sqlu_id`) 
    528528) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; 
  • trunk/configs/openbsd/database/database.sql

    r1129 r1206  
    523523  `sqlu_id` int(10) unsigned NOT NULL auto_increment, 
    524524  `sqld_id` int(10) unsigned DEFAULT '0', 
    525   `sqlu_name` varchar(16) binary DEFAULT 'n/a', 
    526   `sqlu_pass` varchar(16) binary DEFAULT 'n/a', 
     525  `sqlu_name` varchar(64) binary DEFAULT 'n/a', 
     526  `sqlu_pass` varchar(64) binary DEFAULT 'n/a', 
    527527  UNIQUE KEY (`sqlu_id`) 
    528528) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; 
  • trunk/configs/opensuse/database/database.sql

    r1129 r1206  
    523523  `sqlu_id` int(10) unsigned NOT NULL auto_increment, 
    524524  `sqld_id` int(10) unsigned DEFAULT '0', 
    525   `sqlu_name` varchar(16) binary DEFAULT 'n/a', 
    526   `sqlu_pass` varchar(16) binary DEFAULT 'n/a', 
     525  `sqlu_name` varchar(64) binary DEFAULT 'n/a', 
     526  `sqlu_pass` varchar(64) binary DEFAULT 'n/a', 
    527527  UNIQUE KEY (`sqlu_id`) 
    528528) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; 
  • trunk/configs/redhat/database/database.sql

    r1129 r1206  
    523523  `sqlu_id` int(10) unsigned NOT NULL auto_increment, 
    524524  `sqld_id` int(10) unsigned DEFAULT '0', 
    525   `sqlu_name` varchar(16) binary DEFAULT 'n/a', 
    526   `sqlu_pass` varchar(16) binary DEFAULT 'n/a', 
     525  `sqlu_name` varchar(64) binary DEFAULT 'n/a', 
     526  `sqlu_pass` varchar(64) binary DEFAULT 'n/a', 
    527527  UNIQUE KEY (`sqlu_id`) 
    528528) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; 
  • trunk/configs/ubuntu/database/database.sql

    r1129 r1206  
    523523  `sqlu_id` int(10) unsigned NOT NULL auto_increment, 
    524524  `sqld_id` int(10) unsigned DEFAULT '0', 
    525   `sqlu_name` varchar(16) binary DEFAULT 'n/a', 
    526   `sqlu_pass` varchar(16) binary DEFAULT 'n/a', 
     525  `sqlu_name` varchar(64) binary DEFAULT 'n/a', 
     526  `sqlu_pass` varchar(64) binary DEFAULT 'n/a', 
    527527  UNIQUE KEY (`sqlu_id`) 
    528528) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; 
  • trunk/engine/setup/ispcp1.0.0rc2-ispcp.sql

    r1034 r1206  
    3232CHANGE `dtraff_mail` `dtraff_mail` BIGINT UNSIGNED NULL DEFAULT NULL , 
    3333CHANGE `dtraff_pop` `dtraff_pop` BIGINT UNSIGNED NULL DEFAULT NULL; 
     34 
     35ALTER IGNORE TABLE `sql_user` CHANGE `sqlu_name` `sqlu_name` varchar(64) binary DEFAULT 'n/a'; 
     36ALTER IGNORE TABLE `sql_user` CHANGE `sqlu_pass` `sqlu_pass` varchar(64) binary DEFAULT 'n/a'; 
    3437 
    3538-- Drop existing languages (they are outdated anyways) 
  • trunk/engine/setup/ispcp1.0.0rc3-ispcp.sql

    r1068 r1206  
    88-- BEGIN: Upgrade database structure: 
    99UPDATE `config` SET `value` = '1' WHERE `name` = 'DATABASE_REVISION' LIMIT 1; 
     10ALTER IGNORE TABLE `sql_user` CHANGE `sqlu_name` `sqlu_name` varchar(64) binary DEFAULT 'n/a'; 
     11ALTER IGNORE TABLE `sql_user` CHANGE `sqlu_pass` `sqlu_pass` varchar(64) binary DEFAULT 'n/a'; 
    1012-- END: Upgrade database structure 
    1113 
  • trunk/engine/setup/vhcs2.4.7-ispcp.sql

    r1174 r1206  
    7373CHANGE `dtraff_mail` `dtraff_mail` BIGINT UNSIGNED NULL DEFAULT NULL , 
    7474CHANGE `dtraff_pop` `dtraff_pop` BIGINT UNSIGNED NULL DEFAULT NULL; 
     75 
     76ALTER IGNORE TABLE `sql_user` CHANGE `sqlu_name` `sqlu_name` varchar(64) binary DEFAULT 'n/a'; 
     77ALTER IGNORE TABLE `sql_user` CHANGE `sqlu_pass` `sqlu_pass` varchar(64) binary DEFAULT 'n/a'; 
    7578 
    7679ALTER IGNORE TABLE `ftp_group` ADD UNIQUE KEY `groupname` (`groupname`); 
     
    163166-- END: Regenerate config files 
    164167 
    165 -- BEGIN: Change to default ispCP Theme :  
    166 UPDATE `user_gui_props` SET `layout` = 'omega_original';  
     168-- BEGIN: Change to default ispCP Theme : 
     169UPDATE `user_gui_props` SET `layout` = 'omega_original'; 
    167170-- END: Change to default ispCP Theme : 
    168171 
  • trunk/engine/setup/vhcs2.4.8-ispcp.sql

    r1174 r1206  
    4545CHANGE `dtraff_mail` `dtraff_mail` BIGINT UNSIGNED NULL DEFAULT NULL , 
    4646CHANGE `dtraff_pop` `dtraff_pop` BIGINT UNSIGNED NULL DEFAULT NULL; 
     47 
     48ALTER IGNORE TABLE `sql_user` CHANGE `sqlu_name` `sqlu_name` varchar(64) binary DEFAULT 'n/a'; 
     49ALTER IGNORE TABLE `sql_user` CHANGE `sqlu_pass` `sqlu_pass` varchar(64) binary DEFAULT 'n/a'; 
    4750 
    4851ALTER IGNORE TABLE `ftp_group` ADD UNIQUE KEY `groupname` (`groupname`); 
  • trunk/engine/traffic/ispcp-vrl-traff

    r1201 r1206  
    341341                if(exists  $main::cfg{'MAIL_LOG_INC_AMAVIS'} && $main::cfg{'MAIL_LOG_INC_AMAVIS'}) { 
    342342                        # Logs including AMAVIS/SPAMASSASSIN/CLAMAV entries 
    343                 $cmd = "$cat $smtp_delivery_log | $awk '{if (\$5 != \"localhost\" && \$6 != \"virtual\" && \$6 != \"localhost\" && \$10 != \"?\") print substr(\$3, index(\$3, \"@\")+1, length(\$3)),substr(\$4, index(\$4, \"@\")+1, length(\$4)),\$10;}' 1>$smtp_log"; 
    344  
     343                        $cmd = "$cat $smtp_delivery_log | $awk '{if ( \$10 != \"?\" && !(\$5 ~ /localhost|127.0.0.1/ && \$6 ~ /localhost|127.0.0.1/)) print substr(\$3, index(\$3, \"@\")+1, length(\$3)),substr(\$4, index(\$4, \"@\")+1, length(\$4)),\$10;}' 1>$smtp_log"; 
    345344                } else { 
    346345                        # Logs not including AMAVIS/SPAMASSASSIN/CLAMAV entries 
    347            $cmd = "$cat $smtp_delivery_log | $awk '{if (\$5 != \"localhost\" && \$6 != \"localhost\" && \$10 != \"?\") print substr(\$3, index(\$3, \"@\")+1, length(\$3)),substr(\$4, index(\$4, \"@\")+1, length(\$4)),\$10;}' 1>$smtp_log"; 
     346                       $cmd = "$cat $smtp_delivery_log | $awk '{if ( \$10 != \"?\" && \$6 !~ /virtual/ && !(\$5 ~ /localhost|127.0.0.1/ && \$6 ~ /localhost|127.0.0.1/)) print substr(\$3, index(\$3, \"@\")+1, length(\$3)),substr(\$4, index(\$4, \"@\")+1, length(\$4)),\$10;}' 1>$smtp_log"; 
    348347                } 
    349348 
     
    499498 
    500499                # POP3 
    501         $rs = sys_command("$cat $rlog|$grep 'courierpop3login'|$grep 'user='|$grep 'top='|$grep -v 'ip=\\[::ffff:127.0.0.1\\]'|$awk '{print \$7,\$9,substr(\$10,1,length(\$10)-1);}' 1>$pop3_log"); 
    502         return $rs if ($rs != 0); 
    503         # for Fedora 
    504         $rs = sys_command("$cat $rlog|$grep 'pop3d'|$grep 'user='|$grep 'top='|$grep -v 'ip=\\[::ffff:127.0.0.1\\]'|$awk '{print \$7,\$10,substr(\$11,1,length(\$11)-1);}' 1>$pop3_log"); 
    505         return $rs if ($rs != 0); 
     500                # courierpop3login is for Debian. pop3d for Fedora. 
     501                $rs = sys_command("$cat $rlog|$grep -E '(courierpop3login|pop3d).+user=.+top='|$grep -v 'ip=\\[::ffff:127.0.0.1\\]'|" 
     502                        ."$awk '/courierpop3login/ {print \$7,\$9,substr(\$10,1,length(\$10)-1);} " 
     503                        ."/pop3d/ {print \$7,\$10,substr(\$11,1,length(\$11)-1);}'" 
     504                        ." 1>$pop3_log"); 
     505                return $rs if ($rs != 0); 
    506506 
    507507        $res = open(F, '<', $pop3_log); 
  • trunk/gui/client/add_mail_acc.php

    r1181 r1206  
    398398        // Not permitted chars 
    399399        if (!chk_password($pass)) { 
    400             set_page_message(tr('Password data includes not permitted signs!')); 
     400            set_page_message(tr('Password data is shorter than %s signs or includes not permitted signs!'), $cfg['PASSWD_CHARS']); 
    401401            return; 
    402402        } 
  • trunk/gui/include/database-update-functions.php

    r1204 r1206  
    8787                // Get the next database update revision 
    8888                $newRevision    = getNextRevision(); 
    89                  
     89 
    9090                // Get the needed function name 
    9191                $functionName   = returnFunctionName($newRevision); 
     
    106106 
    107107                // Set failedUpdate to true if an databaseUpdate failed 
    108                 if ($sql->HasFailedTrans())                     
     108                if ($sql->HasFailedTrans()) 
    109109                        $failedUpdate = true; 
    110                  
     110 
    111111                // Complete the Transactin and rollback if nessessary 
    112112                $sql->CompleteTrans(); 
    113                  
     113 
    114114                // Display an error if nessessary 
    115115                if($failedUpdate) 
     
    207207        return $sqlUpd; 
    208208} 
     209 
     210/* 
     211 * Fix for ticket #1346 http://www.isp-control.net/ispcp/ticket/1346 (Benedikt Heintel, 2008-06-13) 
     212 */ 
     213function _databaseUpdate_5() { 
     214        $sqlUpd = array(); 
     215 
     216        $sqlUpd[] = "ALTER IGNORE TABLE `sql_user` CHANGE `sqlu_name` `sqlu_name` varchar(64) binary DEFAULT 'n/a';"; 
     217        $sqlUpd[] = "ALTER IGNORE TABLE `sql_user` CHANGE `sqlu_pass` `sqlu_pass` varchar(64) binary DEFAULT 'n/a';"; 
     218 
     219        return $sqlUpd; 
     220} 
    209221?>