]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Don't choke if the user hits a space or something in the 'changed in
authorterry%netscape.com <>
Thu, 27 Aug 1998 07:03:27 +0000 (07:03 +0000)
committerterry%netscape.com <>
Thu, 27 Aug 1998 07:03:27 +0000 (07:03 +0000)
last ___ days' field.

buglist.cgi

index 3ac68c4dfb31ddc093d06982f8e6bd5fa650dbc7..f6d54e4a3980af721790584cda0f54100d849860 100755 (executable)
@@ -238,7 +238,18 @@ if {[info exists FORM(sql)]} {
   }
 
   if {[lookup FORM changedin] != ""} {
-    qadd "and to_days(now()) - to_days(bugs.delta_ts) <= $FORM(changedin) "
+      set c [string trim $FORM(changedin)]
+      if {$c != ""} {
+          if {![regexp {^[0-9]*$} $c]} {
+              puts "
+The 'changed in last ___ days' field must be a simple number.  You entered 
+\"$c\", which doesn't cut it.
+
+Click the Back button and try again."
+              exit
+          }
+          qadd "and to_days(now()) - to_days(bugs.delta_ts) <= $FORM(changedin) "
+      }
   }
 }