Index: openacs-4/packages/acs-lang/www/admin/test/show.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/www/admin/test/show.tcl,v diff -u -N --- openacs-4/packages/acs-lang/www/admin/test/show.tcl 19 Dec 2019 15:54:02 -0000 1.2.2.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,28 +0,0 @@ -ad_page_contract { - This page will read any file in its same local directory and - display the result as HTML. Apparently a leftover from around 2002 - and the GreenPeace times. -} { - file:notnull -} - -if { [regexp {\.\.|^/} $file] } { - - set output "Only files within this directory may be shown." - -} else { - - # [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 text [ns_quotehtml [template::util::read_file $dir/$file]] - set output "
$text
" -} - -ns_return 200 text/html $output - -# Local variables: -# mode: tcl -# tcl-indent-level: 4 -# indent-tabs-mode: nil -# End: