diff options
author | terry%netscape.com <> | 1998-08-27 09:03:27 +0200 |
---|---|---|
committer | terry%netscape.com <> | 1998-08-27 09:03:27 +0200 |
commit | 7b4718459fcfb0872c381588753e752be27e0b11 (patch) | |
tree | 9c454664d7f1e72e30a49230bd1cd390c8947d7e | |
parent | d2d547e32d1e9ac1cb83c508e1517939f03e2e1d (diff) | |
download | bugzilla-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.
-rwxr-xr-x | buglist.cgi | 13 |
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) " + } } } |