Conversation
* update GHA to run with multiple rubies * feat: use RSpec rake task * Resolve gcc 11 compatibility issue (masamitsu-murase#36) * Resolve Ruby 3.0.x/bundler cache issue with 7z.so (p7zip converted to Ruby extension) Co-authored-by: Maxim [maxirmx] Samsonov <m.samsonov@computer.org>
|
(Thank you @maxirmx !) @masamitsu-murase first of all, thank you for the fantastic gem! We (@riboseinc) have been using your seven_zip_ruby gem for our @metanorma and @fontist projects, and have a need to utilize the gem on the latest platforms and Ruby versions. I hope this PR of our contribution will be accepted. Thank you again! |
|
This is a wonderful contribution! I was having the |
b6058f3 to
968e937
Compare
Secure loading of libraries to prevent DLL preloading attacks https://support.microsoft.com/en-us/help/2389418/secure-loading-of-libraries-to-prevent-dll-preloading-attacks
* Fix: Dll Loading * Fix: Extract Path * Update: p7zip 16.02 * Added a script to extract p7zip archive. * Modified the program to support p7zip-16.02. * Update: 7z1900 Dll's * Patch: p7zip_16.02+dfsg-7.debian * Modified p7zip/extract.sh to apply Debian Patch. * Teeny version upgrade. * Added Unit Test. * Improved Unit Test. * Added Unit Test. * typo * Added Unit Test. * typo * The code was improved. Fixed an error message when decryption of wrong password failed. Added taint marks to file paths in archives. * Added the description of extrace.sh. * Imported cut and pasted update of p7zip-16.02. Besides, Added Tainted mark to generated Ruby String. * The exception to be thrown was changed to an appropriate class. * Merge completion * Fixing issues * Fixed invalid password tests * rb_tainted_str_new (deprecated) --> rb_str_new * Fixed merge issue * Fixed compression level tests * Consistent handling of invalid or missing passwords Co-authored-by: niloufar <manew1n-jewr@yahoo.co.jp>
* Fixed GCC 12 compatibility * Added tests on Alpine * Added tests on Ruby 3.2
|
@masamitsu-murase Any possibility of merging this or making the fork the official RubyGem version? |
We have to publish a fork Thank you |
This issue happens when newer versions of gcc are used where default C++ standard is 17. There is an obvious mismatch in
7z code
if (!mftRec.Parse(ByteBuf, Header.SectorSizeLog, numSectorsInRec, NULL, 0))instead ofif (!mftRec.Parse(ByteBuf, Header.SectorSizeLog, numSectorsInRec, 0, NULL))Newer versions of 7z have this fix. I have made a backport.
The issue occurs with Ruby 3.0.x where 7z.so built outside of Ruby extension system was not considered for bundler cache
cc: @ronaldtse
This is a contribution from Metanorma (GitHub), a product of Ribose (GitHub).