Error message if > 255 characters.

        Patch by kareila. 

diffs (29 lines):

diff -r 8d2c494bf77a -r 152677ac5a33 cgi-bin/sysban.pl
--- a/cgi-bin/sysban.pl Sat Jul 25 13:14:17 2009 +0000
+++ b/cgi-bin/sysban.pl Sat Jul 25 13:51:36 2009 +0000
@@ -305,6 +305,12 @@ sub sysban_create {
             message => "Wrong arguments passed; should be a hash\n",
         }, 'ERROR';
     }
+    
+    if ( $opts{note} && length( $opts{note} ) > 255 ) {
+        return bless {
+            message => "Note too long; must be less than 256 characters\n",
+        }, 'ERROR';
+    }
 
 
     my $dbh = LJ::get_db_writer();
@@ -465,6 +471,12 @@ sub sysban_modify {
                         old expiry are required\n",
         }, 'ERROR';
     }
+    
+    if ( $opts{note} && length( $opts{note} ) > 255 ) {
+        return bless {
+            message => "Note too long; must be less than 256 characters\n",
+        }, 'ERROR';
+    }
 
     my $dbh = LJ::get_db_writer();
 
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to