--- parser3/tests/460.html 2026/10/01 14:02:34 1.1 +++ parser3/tests/460.html 2026/10/07 19:51:56 1.3 @@ -9,7 +9,7 @@ $report.[tainted backslash][ $.[save, the directory tainted][ ^outcome{ $s[text] ^s.save[^taint[460_dir]\b.txt] ^if(-f '460_dir/b.txt'){460_dir/b.txt}{NO FILE} }] $.[-f][ ^if(-f ^taint[460_dir\a.txt]){yes}{NO}] $.[load][ ^outcome{ $f[^file::load[text;^taint[460_dir\a.txt]]] $f.text }] - $.[list][ ^outcome{ $l[^file:list[^taint[460_dir]]] ^l.menu{$l.name}[,] }] + $.[list][ ^outcome{ $l[^file:list[^taint[460_dir]]] ^l.sort{$l.name} ^l.menu{$l.name}[,] }] $.[delete removes the directory][ ^outcome{ ^file:delete[^taint[460_dir\a.txt]] ^file:delete[^taint[460_dir\b.txt]] ^if(-d '460_dir'){LEFT}{removed} }] $.[the slash keeps the language of the backslash: json escapes it, as it does with any tainted one][ ^apply-taint[json][^file:fullpath[^taint[<\script>.gif]]]] $.[the name of a file is cut at the last separator][ ^outcome{ $f[^file::create[text;^taint[C:\a\b.txt];x]] $f.name }] @@ -55,12 +55,15 @@ $request:document-root[^taint[$root\test $report.[document-root with a backslash][ $.[the backslash is kept][ $request:document-root] $.[and is a separator: a relative name is inside the root][ ^outcome{ ^file:fullpath[x.gif] } vs $before before ] + $.[diskpath of a web path][ ^file:diskpath[/x.gif]] + $.[diskpath of file://][ ^file:diskpath[file://$root/tests/x.gif]] ] # '|' becomes _7C: a directory next to tests, 460.html is not inside it $request:document-root[^taint[$root|tests]] $report.[document-root with a char escaped in file names][ $.[the char is replaced][ $request:document-root] $.[a relative name is outside the root][ ^outcome{ ^file:fullpath[x.gif] }] + $.[diskpath of a web path][ ^file:diskpath[/x.gif]] ] $text[^print[$report]]