FU: Reject some invalid characters in path
This commit is contained in:
parent
52c36e0aea
commit
6c54ee3091
2 changed files with 3 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ our @EXPORT_OK = qw/
|
|||
sub utf8_decode :prototype($) {
|
||||
return if !defined $_[0];
|
||||
confess 'Invalid UTF-8' if !utf8::decode($_[0]);
|
||||
confess 'Invalid control character' if $_[0] =~ /[\x00-\x08\x0b\x0c\x0e-\x1f]/;
|
||||
confess 'Invalid control character' if $_[0] =~ /[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/;
|
||||
$_[0]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue