Index: openacs-4/packages/acs-tcl/tcl/security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/security-procs.tcl,v diff -u -r1.126.2.83 -r1.126.2.84 --- openacs-4/packages/acs-tcl/tcl/security-procs.tcl 27 Feb 2023 17:31:32 -0000 1.126.2.83 +++ openacs-4/packages/acs-tcl/tcl/security-procs.tcl 27 Feb 2023 17:47:17 -0000 1.126.2.84 @@ -1195,10 +1195,11 @@ # Ensure no ".." in the path # set tmpfile [ns_normalizepath $tmpfile] + set tmpdir [string trimright [ns_config ns/parameters tmpdir] /] - if {[ad_file dirname $tmpfile] ne [ns_config ns/parameters tmpdir]} { + if {[ad_file dirname $tmpfile] ne $tmpdir} { # - # File is not a direct child of one of the tmpfolders: not safe + # File is not a direct child of the tmpfolder: not safe # return false } @@ -1214,14 +1215,14 @@ if {![ad_file owned $tmpfile]} { # # File does not belong to us: not safe - # + # return false } if {![ad_file readable $tmpfile]} { # # We cannot read the file: not safe - # + # return false }