-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX: Handling of encrypted entries #208
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- `PackageParser` changes: - parsing of `mimetype` and `META-INF/manifest.xml` are now done up front; - simpleified entry handling; - dedicated methods for mimetype and manifest parsing; - cleaned up handling of bad zip entries prior to moving this to the zip classes; - `OdfPackage` now has an `isEncrypted()` method to check if the package contains encrypted entries; - simplifed message processing in `ValidatingParser`; - addded encryption detection to prevent validation and profiling of encrypted package entries; - CLI reports incomplete validation for packages with encrypted entries, though this is still a little hacky.
carlwilson
added a commit
that referenced
this pull request
Oct 30, 2024
* DEV: v0.15.0 dev version. (#202) * FIX: Double validation reporting (#201) - removed the validation report output from profile reporting. * FIX: Policy crash when document unparsable (#203) * Dev/0.15 (#204) * DEV: v0.15.0 dev version. * DEV: v0.15.0 dev version. * FIX: Policy crash when package has no manifest (#205) - added check for null manifest when attempting to list package XML files. Closes #193 * FIX: Crashing policy macro check of unreadable entries. (#206) - null stream entries are no longer checked for macros. * FIX: Version detection issues (#207) * FIX: Version detection issues - using full manifest entry name rather than simply file name; and - use appropriate namespace for detection. * FIX: Version detection fall-through. * FIX: Handling of encrypted entries (#208) - `PackageParser` changes: - parsing of `mimetype` and `META-INF/manifest.xml` are now done up front; - simpleified entry handling; - dedicated methods for mimetype and manifest parsing; - cleaned up handling of bad zip entries prior to moving this to the zip classes; - `OdfPackage` now has an `isEncrypted()` method to check if the package contains encrypted entries; - simplifed message processing in `ValidatingParser`; - addded encryption detection to prevent validation and profiling of encrypted package entries; - CLI reports incomplete validation for packages with encrypted entries, though this is still a little hacky. * REL: v0.16.0 (#209) - bumped maven version -> 0.16.0; - updated version in batch start files; and - updated version in README and other documentation.
carlwilson
added a commit
that referenced
this pull request
Nov 19, 2024
* REL: v0.16.0 (#210) * DEV: v0.15.0 dev version. (#202) * FIX: Double validation reporting (#201) - removed the validation report output from profile reporting. * FIX: Policy crash when document unparsable (#203) * Dev/0.15 (#204) * DEV: v0.15.0 dev version. * DEV: v0.15.0 dev version. * FIX: Policy crash when package has no manifest (#205) - added check for null manifest when attempting to list package XML files. Closes #193 * FIX: Crashing policy macro check of unreadable entries. (#206) - null stream entries are no longer checked for macros. * FIX: Version detection issues (#207) * FIX: Version detection issues - using full manifest entry name rather than simply file name; and - use appropriate namespace for detection. * FIX: Version detection fall-through. * FIX: Handling of encrypted entries (#208) - `PackageParser` changes: - parsing of `mimetype` and `META-INF/manifest.xml` are now done up front; - simpleified entry handling; - dedicated methods for mimetype and manifest parsing; - cleaned up handling of bad zip entries prior to moving this to the zip classes; - `OdfPackage` now has an `isEncrypted()` method to check if the package contains encrypted entries; - simplifed message processing in `ValidatingParser`; - addded encryption detection to prevent validation and profiling of encrypted package entries; - CLI reports incomplete validation for packages with encrypted entries, though this is still a little hacky. * REL: v0.16.0 (#209) - bumped maven version -> 0.16.0; - updated version in batch start files; and - updated version in README and other documentation. * FIX: Encryption checking of bad documents (#213) - fixed bug where checking encryption of unparseable packages caused an NPE; - bumped version to 0.16.1 for the fix; - updated documentation and batch files for new version number. * DEV: Version 0.16.2-SNAPSHOT (#216) - bumped `pom.xml` versions to `0.16.2-SNAPSHOT`; and - updated version in documents and batch files. * FIX: Don't parse check missing entries (#217) - check that an XML document in the manifest exists before grabbing the parse entry. * PARK: Policy checking single files - fixed a few rules so that single files don't crash; BUT - a better approach would be to simply offer a single document based check method. * FIX: Unimplemented profile checks - for unimplemented profile checks against a single file, return an empty message log; - added protection against missing package at the start of the profile check; - added some null checks to profile checking methods; and - removed some unused imports and parameters. TODO: Implement schematron checks for a single file.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PackageParser
changes:mimetype
andMETA-INF/manifest.xml
are now done up front;OdfPackage
now has anisEncrypted()
method to check if the package contains encrypted entries;ValidatingParser
;Fixes #195