summaryrefslogtreecommitdiffstats
path: root/buglist.cgi
diff options
context:
space:
mode:
authorterry%netscape.com <>1998-08-27 09:03:27 +0200
committerterry%netscape.com <>1998-08-27 09:03:27 +0200
commit7b4718459fcfb0872c381588753e752be27e0b11 (patch)
tree9c454664d7f1e72e30a49230bd1cd390c8947d7e /buglist.cgi
parentd2d547e32d1e9ac1cb83c508e1517939f03e2e1d (diff)
downloadbugzilla-7b4718459fcfb0872c381588753e752be27e0b11.tar.gz
bugzilla-7b4718459fcfb0872c381588753e752be27e0b11.tar.xz
Don't choke if the user hits a space or something in the 'changed in
last ___ days' field.
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-xbuglist.cgi13
1 files changed, 12 insertions, 1 deletions
diff --git a/buglist.cgi b/buglist.cgi
index 3ac68c4df..f6d54e4a3 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -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) "
+ }
}
}