From 093397475107223bd25698f6f3eeaed6334619c7 Mon Sep 17 00:00:00 2001 From: paul Date: Sat, 3 Oct 2015 15:42:44 +0000 Subject: [PATCH] use validate function from shcgi svn path=/trunk/; revision=92 --- globals.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/globals.sh b/globals.sh index 1445d48..1bc1ae9 100755 --- a/globals.sh +++ b/globals.sh @@ -17,7 +17,6 @@ # You should have received a copy of the GNU Affero General Public License # along with Serve0. If not, see . - alias _wiki="stx2any --no-template --link-abbrevs --quote -T html" file_pattern='^.*(mov|ts|mpg|mpeg|mp4|m4v|avi|mkv|flv|sfv|wmv|ogm|webm|iso|rmvb)$' @@ -25,12 +24,8 @@ data_dirs cache meta mp4 videos thumbs trash by_length transcoded PAGE="${_GET[p]:-${PAGE:-list}}" -cgi_cookie -validate(){ printf '%s\n' "$1" |sed -rn '2q;/^('"$2"')$/{p;q};a'"$3"; } - _GET[o]=$( validate "${_GET[o]}" 'Name|Date|Length' Name) _GET[pn]=$(validate "${_GET[pn]}" '[1-9][0-9]*' 1) +cgi_cookie _COOKIE[pagesize]=$(validate "${_COOKIE[pagesize]}" '[1-9][0-9]*' 50) - - -- 2.39.2