guzba / zippy

Pure Nim implementation of deflate, zlib, gzip and zip.
MIT License
246 stars 29 forks source link

Paths containing `..` bug #29

Closed dom96 closed 2 years ago

dom96 commented 2 years ago

I can understand not supporting extraction of paths that are relative, but I think this is an edge case that isn't relative and also isn't supported:

Extracting paths containing `...` is not supported (nim-1.0.4/c_code/7_1/@m..@slib@spackages@sdocutils@srstgen.nim.c)

This is from from nim-1.0.4-linux_x64.tar.xz.

I have similar checks in my library which it seems I was also not sure about (https://github.com/dom96/untar/blob/master/src/untar.nim#L149), but I think checking for just ".." is too broad.

guzba commented 2 years ago

Ah thanks for making an issue. I definitely would like to allow that path. The .. check was just "simple" in the moment, not really ever meant to be perfect. Let's improve it.

guzba commented 2 years ago

Changes released in zippy 0.7.1