[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-cvs
Subject:    [SM-CVS] CVS: squirrelmail/config conf.pl, 1.240,
From:       Tomas Kuliavas <tokul () users ! sourceforge ! net>
Date:       2006-06-27 10:08:56
Message-ID: E1FvAV6-000058-Ie () sc8-pr-cvs8 ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/squirrelmail/squirrelmail/config
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32215/config

Modified Files:
	conf.pl config_default.php 
Log Message:
Address book file backend will break with error message, if required
address book fields are not available. Prevents address book corruption
and address book format violations that can cause PHP notices.

Added line length setting in local_file address book backend (#1181561).


Index: conf.pl
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/config/conf.pl,v
retrieving revision 1.240
retrieving revision 1.241
diff -u -w -r1.240 -r1.241
--- conf.pl	26 Jun 2006 17:13:33 -0000	1.240
+++ conf.pl	27 Jun 2006 10:08:52 -0000	1.241
@@ -421,6 +421,9 @@
 $disable_thread_sort = 'false'         if ( !$disable_thread_sort );
 $disable_server_sort = 'false'         if ( !$disable_server_sort );
 
+# since 1.5.2
+$abook_file_line_length = 2048         if ( !$abook_file_line_length );
+
 if ( $ARGV[0] eq '--install-plugin' ) {
     print "Activating plugin " . $ARGV[1] . "\n";
     push @plugins, $ARGV[1];
@@ -621,6 +624,7 @@
         print "3.  Global address book file                    : \
                $WHT$abook_global_file$NRM\n";
         print "4.  Allow writing into global file address book : \
                $WHT$abook_global_file_writeable$NRM\n";
         print "5.  Allow listing of global file address book   : \
$WHT$abook_global_file_listing$NRM\n"; +        print "6.  Allowed address book line \
length            : $WHT$abook_file_line_length$NRM\n";  print "\n";
         print "R   Return to Main Menu\n";
     } elsif ( $menu == 7 ) {
@@ -839,6 +843,7 @@
             elsif ( $command == 3 ) { $abook_global_file=command63(); }
             elsif ( $command == 4 ) { command64(); }
             elsif ( $command == 5 ) { command65(); }
+            elsif ( $command == 6 ) { command_abook_file_line_length(); }
         } elsif ( $menu == 7 ) {
             if ( $command == 1 ) { $motd = command71(); }
         } elsif ( $menu == 8 ) {
@@ -3322,6 +3327,37 @@
     return $abook_global_file_listing;
 }
 
+# controls $abook_file_line_length setting
+sub command_abook_file_line_length {
+    print "This setting controls space allocated to file based address book \
records.\n"; +    print "End users will be unable to save address book entry, if \
total entry size \n"; +    print "(quoted address book fields + 4 delimiters + \
linefeed) exceeds allowed \n"; +    print "address book length size.\n";
+    print "\n";
+    print "Same setting is applied to personal and global file based address \
books.\n"; +    print "\n";
+    print "It is strongly recommended to keep default setting value. Change it \
only\n"; +    print "if you really want to store address book entries that are bigger \
than two\n"; +    print "kilobytes (2048).\n";
+    print "\n";
+
+    print "Enter allowed address book line length [$abook_file_line_length]: ";
+    my $tmp = <STDIN>;
+    $tmp = trim($tmp);
+    # value is not modified, if user hits Enter or enters space
+    if ($tmp ne '') {
+        # make sure that input is numeric
+        if ($tmp =~ /^\d+$/) {
+            $abook_file_line_length = $tmp;
+        } else {
+            print "If you want to change this setting, you must enter number.\n";
+            print "If you want to keep original setting - enter space.\n\n";
+            print "Press Enter to continue...";
+            $tmp = <STDIN>;
+        }
+    }
+}
+
 sub command91 {
     print "If you want to store your users address book details in a database \
                then\n";
     print "you need to set this DSN to a valid value. The format for this is:\n";
@@ -4094,6 +4130,8 @@
         print CF "\$abook_global_file_writeable = \
$abook_global_file_writeable;\n\n";  # boolean
         print CF "\$abook_global_file_listing = $abook_global_file_listing;\n\n";
+        # integer
+        print CF "\$abook_file_line_length = $abook_file_line_length;\n\n";
         # boolean
         print CF "\$no_list_for_subscribe = $no_list_for_subscribe;\n";
 

Index: config_default.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/config/config_default.php,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -w -r1.133 -r1.134
--- config_default.php	8 Jun 2006 15:45:28 -0000	1.133
+++ config_default.php	27 Jun 2006 10:08:53 -0000	1.134
@@ -918,6 +918,24 @@
 $abook_global_file_listing = true;
 
 /**
+ * Controls file based address book entry size
+ * 
+ * This setting controls space allocated to file based address book records.
+ * End users will be unable to save address book entry, if total entry size 
+ * (quoted address book fields + 4 delimiters + linefeed) exceeds allowed
+ * address book length size.
+ *
+ * Same setting is applied to personal and global file based address books.
+ *
+ * It is strongly recommended to keep default setting value. Change it only
+ * if you really want to store address book entries that are bigger than two
+ * kilobytes (2048).
+ * @global integer $abook_file_line_length
+ * @since 1.5.2
+ */
+$abook_file_line_length = 2048;
+
+/**
  * MOTD
  *
  * This is a message that is displayed immediately after a user logs in.


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
--
squirrelmail-cvs mailing list
List Address: squirrelmail-cvs@lists.sourceforge.net
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
http://squirrelmail.org/cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic