You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expect{subject.extract(source,target)}.toraise_error(LogStash::CompressError,/Refusing to extract file to unsafe path.*Files may not traverse with `..`/)
113
+
end
114
+
82
115
context"patterns"do
83
116
# Theses tests sound duplicated but they are actually better than the other one
84
117
# since they do not involve any mocks.
@@ -177,6 +210,14 @@ def list_files(target)
177
210
expect(File).toreceive(:open).exactly(3).times
178
211
subject.extract(source,target)
179
212
end
213
+
214
+
it"raises CompressError when an entry path traverses with .."do
expect{subject.extract(source,target)}.toraise_error(LogStash::CompressError,/Refusing to extract file to unsafe path.*Files may not traverse with `..`/)
0 commit comments