Skip to content

Commit

Permalink
Item13883: fixed Item15163
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Jan 17, 2023
1 parent 6fc0fd5 commit 704ec03
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/lib/Foswiki/Sandbox.pm
Original file line number Diff line number Diff line change
Expand Up @@ -237,16 +237,16 @@ sub _cleanUpFilePath {
next unless ( defined($component) && $component ne '' || $first );
$first = 0;
$component = '' unless defined $component;
next if $component eq '.';
if ( $component eq '..' ) {
throw Error::Simple( 'relative path in filename ' . $string );
}
elsif ( $component =~ m/$Foswiki::cfg{AttachmentNameFilter}/ ) {
if ( $component =~ m/$Foswiki::cfg{AttachmentNameFilter}/ ) {
throw Error::Simple( 'illegal characters in file name component "'
. $component
. '" of filename '
. $string );
}
next if $component eq '.';
if ( $component eq '..' ) {
throw Error::Simple( 'relative path in filename ' . $string );
}
push( @result, $component );
}

Expand Down

0 comments on commit 704ec03

Please sign in to comment.