Compare commits
3 commits
984724a465
...
d58e46d65e
Author | SHA1 | Date | |
---|---|---|---|
d58e46d65e | |||
b32c10f080 | |||
a9057a8831 |
1 changed files with 3 additions and 3 deletions
|
@ -57,11 +57,11 @@ impl super::FileSystemLike for RealFileSystem {
|
|||
|
||||
impl RealFileSystem {
|
||||
fn validate(&self, path: &Path) -> super::Result<()> {
|
||||
let canon = self.clean_path(path)?;
|
||||
if !canon.starts_with(&self.base) {
|
||||
let path = self.clean_path(path)?;
|
||||
if !path.starts_with(&self.base) {
|
||||
return Err(super::Error::PathTraversal {
|
||||
base: self.base.clone(),
|
||||
path: canon.to_path_buf(),
|
||||
path,
|
||||
});
|
||||
}
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in a new issue