Fixed relative filepath check

Signed-off-by: Jason Sommer <jsdirv@gmail.com>
This commit is contained in:
Jason Sommer 2015-02-16 20:38:52 -06:00
parent 35464d7db3
commit eba8586d2b
3 changed files with 28 additions and 2 deletions

View file

@ -525,7 +525,7 @@ loop:
if err != nil {
return err
}
if strings.HasPrefix(rel, "..") {
if strings.HasPrefix(rel, "../") {
return breakoutError(fmt.Errorf("%q is outside of %q", hdr.Name, dest))
}