Index: openacs-4/packages/acs-templating/www/doc/demo/compile.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/demo/compile.tcl,v diff -u -r1.1.1.1.30.2 -r1.1.1.1.30.3 --- openacs-4/packages/acs-templating/www/doc/demo/compile.tcl 24 May 2016 09:11:28 -0000 1.1.1.1.30.2 +++ openacs-4/packages/acs-templating/www/doc/demo/compile.tcl 26 May 2016 17:21:59 -0000 1.1.1.1.30.3 @@ -10,13 +10,16 @@ if { [regexp {\.\.|^/} $file] } { ad_complain "Only files within this directory may be shown." } + set dir [file dirname [ad_conn file]] + if { ![file readable $file] } { + ad_complain "requested file is not readable." + } } } # [ns_url2file [ns_conn url]] fails under request processor ! # the file for URL pkg/page may be in packages/pkg/www/page, not www/pkg/page -set dir [file dirname [ad_conn file]] set compiled [template::adp_compile -file $dir/$file] # Local variables: