File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,7 @@ view_ecmd=The command $1 needed to create an archive is not installed
168168view_ecomp=Failed to create archive : $1
169169view_earchive=You are not allowed to download archives
170170view_earchmax=The selected directory is larger than the maximum allowed for archiving ($1 bytes)
171+ view_epathinfo=Path contains invalid characters
171172
172173paste_ecopy=You must cut or copy before pasting
173174paste_egone=Copied file $1 no longer exists
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ require './file-lib.pl';
77&ReadParse();
88use POSIX;
99$p = $ENV {' PATH_INFO' };
10+ ($p =~ / ^\s *\| / || $p =~ / \|\s *$ / || $p =~ / \0 / ) &&
11+ &error_exit($text {' view_epathinfo' });
1012if ($in {' type' }) {
1113 # Use the supplied content type
1214 $type = $in {' type' };
@@ -116,7 +118,7 @@ if ($in{'format'}) {
116118 close (FILE);
117119 }
118120else {
119- if (!open (FILE, $p )) {
121+ if (!open (FILE, " < " , $p )) {
120122 # Unix permissions prevent access
121123 &error_exit(&text(' view_eopen' , $p , $! ));
122124 }
You can’t perform that action at this time.
0 commit comments