mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-22 03:32:18 -05:00
11 lines
433 B
Ruby
11 lines
433 B
Ruby
module Archive
|
|
# Create a preset "secure extraction" flag combination for libarchive to make sure we avoid security problems
|
|
# See https://github.com/libarchive/libarchive/blob/6ee1eebefdf41f36ef1a548c9a7000d132c453f3/libarchive/archive.h#L662
|
|
EXTRACT_SECURE = [
|
|
Archive::EXTRACT_TIME,
|
|
Archive::EXTRACT_NO_OVERWRITE,
|
|
Archive::EXTRACT_NO_OVERWRITE_NEWER,
|
|
Archive::EXTRACT_SECURE_NODOTDOT
|
|
].reduce(:|).to_i
|
|
end
|