fix: Document feature unreserved and make the mapping of extra fields public#616
fix: Document feature unreserved and make the mapping of extra fields public#616Pr0methean merged 9 commits intomasterfrom
unreserved and make the mapping of extra fields public#616Conversation
Summary of ChangesHello @Its-Just-Nans, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Note: some of the third party were missing ! |
There was a problem hiding this comment.
This PR successfully documents the unreserved feature and makes the extra field mapping public as intended. The changes are well-structured:
✅ Good changes:
- Added clear documentation for the
unreservedfeature in Cargo.toml - Made
EXTRA_FIELD_MAPPINGpublic and moved it to the appropriate module - Updated imports to use the new public constant
- Cleaned up the CI workflow by removing the deleted
_all-featuresflag - Improved module documentation capitalization
- The expansion from 43 to 57 extra field entries - ensure all new mappings are accurate and properly sourced
The implementation correctly follows the user guidelines by making the feature flag functionality more discoverable and properly documented.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
There was a problem hiding this comment.
Code Review
This pull request aims to document the unreserved feature and centralize the EXTRA_FIELD_MAPPING constant. However, the expansion of EXTRA_FIELD_MAPPING to include IDs like 0x9901 (AES encryption) and 0xa11e (data alignment) introduces a critical security regression. The library's own validation logic in src/write.rs now prevents the creation of ZIP files with these core features by default, forcing users to enable the unreserved feature and bypass intended security controls. Furthermore, the add_extra_data method in src/write.rs modifies internal state before validation, which can lead to an inconsistent state if validation fails, posing a security risk. For improved performance and maintainability, the EXTRA_FIELD_MAPPING constant should also be sorted to allow for more efficient binary_search usage.
|
Thanks for the review, I answered or fixed some of them |
unreserved and make the mapping of extra fields public
|
I think your change will not work The My test was only used to see if we could access a private enum, the answer is yes (I think because it's a constant compile) |
|
Before commit 7f578a0, your change contained |
Oh okay I wanted to compare with 1 as u16 and then with 0x0001 I can change later or you can do the change |
Co-authored-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> Signed-off-by: n4n5 <git@n4n5.dev>
Co-authored-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> Signed-off-by: n4n5 <git@n4n5.dev>
da2f6ca to
2234896
Compare
|
I've now done it. |
Document feature unreserved and make public the mapping
Also remove the
_all-featuresincargo_hack.ymlsince it was deleted in #612Linked to