From: paul Date: Mon, 11 Apr 2016 17:24:21 +0000 (+0000) Subject: allow dots in static file names X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=67bf6b2b7de1bca9625626a31e5db60d59ad7b7c;p=shcgi allow dots in static file names svn path=/trunk/; revision=25 --- diff --git a/index.cgi b/index.cgi index 92ccfd6..f35a5bd 100755 --- a/index.cgi +++ b/index.cgi @@ -40,7 +40,7 @@ _EXEC="${real%/shcgi/index.cgi}" #execution directory PAGE=$(validate "${PAGE:-${_GET[page]}}" '[a-zA-Z0-9_-]+' '') ACTION=$(validate "${ACTION:-${_GET[action]}}" '[a-zA-Z0-9_-]+' '') -STATIC=$(validate "${STATIC:-${_GET[static]}}" '[^\.]+' '') +STATIC=$(invalidate "${STATIC:-${_GET[static]}}" '(^|.*/)\.\./.*' '') if [ -n "$PAGE" -a -x "${_EXEC}/pages/${PAGE}.sh" ]; then . "$_EXEC/shcgi/page.sh"