From 7b4718459fcfb0872c381588753e752be27e0b11 Mon Sep 17 00:00:00 2001 From: "terry%netscape.com" <> Date: Thu, 27 Aug 1998 07:03:27 +0000 Subject: Don't choke if the user hits a space or something in the 'changed in last ___ days' field. --- buglist.cgi | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'buglist.cgi') 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) " + } } } -- cgit v1.2.3-24-g4f1b