Index: openacs-4/packages/acs-tcl/tcl/test/security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/Attic/security-procs.tcl,v diff -u -r1.1.2.5 -r1.1.2.6 --- openacs-4/packages/acs-tcl/tcl/test/security-procs.tcl 25 Aug 2022 11:25:11 -0000 1.1.2.5 +++ openacs-4/packages/acs-tcl/tcl/test/security-procs.tcl 25 Aug 2022 12:37:14 -0000 1.1.2.6 @@ -108,11 +108,16 @@ aa_section {Path to a tmpfile that does not exist yet} aa_true "A temporary filename is safe" [security::safe_tmpfile_p $tmpfile] + set tmpfile [ad_tmpnam] + aa_section {Path to a tmpfile that we demand to exist} + aa_false "A temporary filename is not safe if the file des not exist" \ + [security::safe_tmpfile_p -must_exist $tmpfile] + aa_section {Path to an existing tmpfile} set wfd [open $tmpfile w] puts $wfd 1234 close $wfd - aa_true "An existing tmpfile is safe" [security::safe_tmpfile_p $tmpfile] + aa_true "An existing tmpfile is safe" [security::safe_tmpfile_p -must_exist $tmpfile] file delete -- $tmpfile aa_section {Path to a tmpfile in a folder of the tmpdir}