Adam Hathcock
970e31a1b1
cleanup and run csharpier
2022-12-20 13:45:47 +00:00
Adam Hathcock
d6ac9a0363
Fix build
2022-12-20 13:09:16 +00:00
Sugita Akira
418c1256a8
Ignores UnicodePathExtra if forced encoding is specified
2022-09-14 21:45:41 -07:00
Lars Vahlenberg
44a5433af3
64bit DataDescriptor
2022-08-04 21:22:31 +02:00
Adam Hathcock
70343b17bc
add more tests for uncompressed streaming zips
2022-07-29 09:47:35 +01:00
Lars Vahlenberg
5706732c55
Naive implementation of searching of DataDescriptor, not compatible with big archives (>32bit), but handles test cases.
2022-07-28 23:03:06 +02:00
Lars Vahlenberg
7c56df1237
Mitigation of problems
2022-07-28 20:36:28 +02:00
Adam Hathcock
8cb566b031
Merge branch 'master' into feature/#636
2022-06-22 09:05:57 +01:00
Lars Vahlenberg
089b16326e
ReadOnlySubStream overrides and adds logic to Read byte[], needs to have same logic for Span<byte> for consistency.
2022-06-21 19:30:07 +02:00
Adam Hathcock
62c94a178c
Merge branch 'master' into Task_477
2022-06-20 10:26:45 +01:00
Adam Hathcock
cd3114d39e
Merge branch 'master' into DeduplicateNonDisposing
2022-06-20 10:20:02 +01:00
Martin Demberger
35336a0827
Suppress nested NonDisposingStream
2022-06-19 22:05:52 +02:00
Lars Vahlenberg
a00075ee0d
Wrong flags set, we do not expose this in the interface
2022-06-17 15:07:07 +02:00
Lars Vahlenberg
b6c4e28b4d
Generated test case, however, don't see any problems
2022-06-16 23:32:46 +02:00
Martin Demberger
8b55cce39a
Better handling of uncompressed zip files.
2022-06-15 16:28:14 +02:00
Craig
61c01ce9b0
Properly integrated zip multivolume and split support.
2022-04-30 19:35:40 +01:00
Craig
224614312f
Added multipart Zip support (z01...). Added IEntry.IsSolid and implemented Rar and 7Zi[ support.
2022-04-25 01:16:53 +01:00
Adam Hathcock
6950eebf9f
Dependency updates and start of enforcing some C# standards
2022-04-21 08:54:59 +01:00
Craig
ec1999f73d
Added Split archive support with unit tests. Added ArchiveFactory.IsArchive() and minor refactor.
2022-04-21 00:12:26 +01:00
Adam Hathcock
ec2be2869f
Fix whitespace from dotnet format
2021-10-02 15:29:03 +01:00
Christian
3e32e3d7b1
Allowing to seek empty zip files
2021-09-02 13:54:32 +02:00
Daniel Nash
fdc33e91bd
Conditionally parse Zip64 extra field based on specification
...
The Zip64 extra field should look for values based on the corresponding
values in the local entry header.
Fixes adamhathcock/sharpcompress#595
2021-04-26 14:58:10 -04:00
Adam Hathcock
c10bd840c5
ReadFully used by pkware encryption didn’t like spans
2021-04-25 09:25:51 +01:00
Lars Vahlenberg
045093f453
Linux is case sensitive with files names
2021-02-14 10:26:26 +01:00
Lars Vahlenberg
d1d2758ee0
Propsal for handling Zip with long comment
2021-02-13 23:57:03 +01:00
Adam Hathcock
5357bd07c7
Let dotnet format do it’s thing
2021-01-09 13:33:34 +00:00
Jason Nelson
404a6b231d
Fix .NET 461 failures
2020-07-31 10:12:34 -07:00
Jason Nelson
f00f393687
Disable failing net461 tests
2020-07-31 09:30:20 -07:00
Jason Nelson
cbbfb89619
Add failure notes
2020-07-31 09:29:06 -07:00
Adam Hathcock
f521fd35ff
Fix tests, update to 0.26
2020-07-26 14:36:07 +01:00
Adam Hathcock
632bae725d
Add braces for clarity
2020-05-14 13:47:21 +01:00
Adam Hathcock
400d2c1774
Fix usings and add braces for better merging
2020-04-03 08:47:30 +01:00
Lars Vahlenberg
9bf9d34d94
Issue86 Proposal
2020-01-16 22:08:48 +01:00
Daniel Nash
af264cdc58
Return a bounded substream when data descriptors are used in seekable zips
2019-06-04 08:31:42 -04:00
Daniel Nash
b2bd20b47e
Handle a bad extra field in a local file header in zip files
2019-06-03 13:02:28 -04:00
Richard Webb
4e9cd064dd
Unit test to show reading of a Zip volume/archive comment
2019-01-13 21:05:55 +00:00
Matt Kotsenas
93c0b91de9
Refactor TestSharpCompressWithEmptyStream
...
Refactor `TestSharpCompressWithEmptyStream` so it asserts that the files
and bytes are the same.
2018-07-12 10:32:08 -07:00
Matt Kotsenas
3c2f4ebe9b
Combine ForwardOnlyStream and NonSeekableStream
...
Delete `NonSeekableStream` used in Zip64 tests in favor
of `ForwardOnlyStream` used in Mocks.
Additionally, delete the `ForwardOnlyStream.ReadByte` implementation
as the implementation on the base Stream is sufficient.
2018-07-11 16:42:03 -07:00
Matt Kotsenas
6ae715b153
Move the TestStream and ForwardOnlyStream to Mocks folder
...
Move the `TestStream` and `ForwardOnlyStream` to Mocks/ to separate them
from the test classes.
2018-07-10 12:07:32 -07:00
Matt Kotsenas
7b338511cc
Create unique scratch path per test
...
Tests fail in Visual Studio because they try to reuse the same scratch
working space, and each test is responsible for resetting the space. To
simplify the test code:
1. Make `TestBase` `IDisposable` and have it create the scratch space
2. Remove `ResetScratch()` as it is now handled by the base class
3. Add a unique ID to each scrach space folder to prevent collisions
2018-07-10 11:46:44 -07:00
twirpx
e822f9a95c
Tests fixed to use explicit use of 866 encoding because of usage file named in Russian in several tests
2018-05-30 22:17:27 +05:00
Julien Lebosquain
540618c062
Implemented ReadByte/WriteByte on streams to improve performance
2018-05-27 16:31:44 +02:00
Adam Hathcock
3f94c1a50d
Remove lingering uses of non disposing stream
2018-05-08 14:10:49 +01:00
Adam Hathcock
5fdae1cf82
Make readonly and fix visibility
2018-05-05 19:23:34 +01:00
Adam Hathcock
8b478451ac
Evil zip is a windows only test because of paths
2018-05-05 09:05:32 +01:00
odinn1986
80ceb1c375
fix: prevent extracting archived files outside of target path
...
This PR is meant to fix an arbitrary file write vulnerability, that can be
achieved using a specially crafted zip archive, that holds path traversal
filenames. When the filename gets concatenated to the target extraction
directory, the final path ends up outside of the target folder.
A sample malicious zip file named Zip.Evil.zip was used,
and when running the code below, resulted in the creation of C:/Temp/evil.txt
outside of the intended target directory.
There are various possible ways to avoid this issue, some include checking
for .. (dot dot) characters in the filename, but the best solution in our
opinion is to check if the final target filename, starts with the target
folder (after both are resolved to their absolute path).
Stay secure,
Snyk Team
2018-05-02 23:12:33 +03:00
frabar666
6e2c7d2857
support Deflate64 decompression
2018-02-27 23:31:11 +01:00
Adam Hathcock
a8b6def76a
Netcore2 ( #302 )
...
* Add netstandard 2.0 target and netcoreapp2.0 tests
* Update xunit
* set tests explicitly to netcore2
* update travis
* Don't say build as netcoreapp1.0
* try adding dotnet 1 too
* Remove .NET Core 1 support
* switch to circle
* update cake
* fix circle build
* try fix file ending test again
* Fix casing on files
* Another casing fix
* Add back netstandard1.0
* Finish adding netstandard 1.0 back
* Add netstandard1.3 back
2017-12-08 12:00:29 +00:00
Adam Hathcock
15110e18e2
Don't skip ZipReader data twice. ( #272 )
...
* Don't skip ZipReader data twice.
* Add archive for a new test
2017-07-17 11:05:21 -04:00
Adam Hathcock
e7bfc40461
Fix Skipping when compressed size is unknown (fallback to decompressing)
2017-06-01 09:26:08 +01:00