Index: openacs-4/packages/search/www/advanced-search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/search/www/advanced-search.tcl,v diff -u -r1.3.10.1 -r1.3.10.2 --- openacs-4/packages/search/www/advanced-search.tcl 12 Sep 2015 19:00:45 -0000 1.3.10.1 +++ openacs-4/packages/search/www/advanced-search.tcl 24 May 2016 21:56:45 -0000 1.3.10.2 @@ -1,8 +1,22 @@ ad_page_contract { @author Neophytos Demetriou } { - {q ""} - {num 0} + + {q:trim,notnull ""} + {num:range(1|200),notnull 0} + +} -validate { + + check_q -requires q { + if {[string length $q] < 3} { + set name q + set min_length 3 + set actual_length [string length $q] + ad_complain [_ acs-tcl.lt_name_is_too_short__Pl] + } + } + + csrf { security::csrf::validate } } set package_id [ad_conn package_id]