Skip to content

Commit 1f1411f

Browse files
committed
1 parent ed73650 commit 1f1411f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Diff for: file/lang/en

+1
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ view_ecmd=The command $1 needed to create an archive is not installed
168168
view_ecomp=Failed to create archive : $1
169169
view_earchive=You are not allowed to download archives
170170
view_earchmax=The selected directory is larger than the maximum allowed for archiving ($1 bytes)
171+
view_epathinfo=Path contains invalid characters
171172

172173
paste_ecopy=You must cut or copy before pasting
173174
paste_egone=Copied file $1 no longer exists

Diff for: file/show.cgi

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ require './file-lib.pl';
77
&ReadParse();
88
use POSIX;
99
$p = $ENV{'PATH_INFO'};
10+
($p =~ /^\s*\|/ || $p =~ /\|\s*$/ || $p =~ /\0/) &&
11+
&error_exit($text{'view_epathinfo'});
1012
if ($in{'type'}) {
1113
# Use the supplied content type
1214
$type = $in{'type'};
@@ -116,7 +118,7 @@ if ($in{'format'}) {
116118
close(FILE);
117119
}
118120
else {
119-
if (!open(FILE, $p)) {
121+
if (!open(FILE, "<", $p)) {
120122
# Unix permissions prevent access
121123
&error_exit(&text('view_eopen', $p, $!));
122124
}

0 commit comments

Comments
 (0)