mirror of
git://git.proxmox.com/git/pxar.git
synced 2025-01-08 01:17:40 +03:00
decoder: forbid slashes in file names
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
ef72634f27
commit
2dfb36020a
@ -317,6 +317,9 @@ impl<I: SeqRead> DecoderImpl<I> {
|
||||
if data.is_empty() {
|
||||
io_bail!("illegal path found (empty)");
|
||||
}
|
||||
if data.contains(&b'/') {
|
||||
io_bail!("illegal path found (contains slashes, this is a security concern)");
|
||||
}
|
||||
|
||||
let path = PathBuf::from(OsString::from_vec(data));
|
||||
self.set_path(&path)?;
|
||||
|
Loading…
Reference in New Issue
Block a user