Repository navigation
Version 0.57.0 - #490
Merged
Merged
Version 0.57.0#490
Conversation
Add tests for stripRtf()
Added ability for stripped RTF test to read rtf example files
In further analyzing the test files, it was discovered that they contained unknown streams not documented to be part of the msg file format. For safety and cleanness, these files have had the excess streams removed.
Correct generated flags and start adding properties for each stream
Advisory fix 1
This file contains hidden or 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
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.
v0.57.0
--wk-allow-external-fileson the command line (orwkAllowExternalFilestoMessageBase.save()) will be required for external files to be loaded into the HTML to convert. Without these, they will be stripped before reaching wkhtmltopdf for security.extract-msgside to waste massive amounts of time and memory resources.MSGFile.getMultipleBinary(),MSGFile.getMultipleString(), andMSGFile.exists()to significantly reduce wasted times for malicious files. Malicious files previously could cause extract-msg to do unnecessarily large numbers of calls toMSGFile.exists()which previously did not use caching to speed up its search.MSGFile.listDir()to return a tuple of tuples to prevent it's cache results from being tampered with.MSGFile.listDir()that caused it to not cache in certain circumstances when it should always cache.MSGFile.getMultipleBinary()that executed wrong and did not properly check for bad data.MSGFile._getTypedSteam()to correctly parse binary and string streams when an entry is missing.StandardViolationErrorbeing raised without checking error behavior inMSGFile.getMultipleBinary()andMSGFile.getMultipleString().MSGFile.getMultipleString()that is raised (or logged, depending on error behavior) if a string stream is missing a null byte. This also doesn't strip the last character in the stream if it is not null.MSGFile.getMultipleBinary()andMSGFile.getMultipleString()that checks to see if the expected length for each stream matches what the length stream says. If not, it logs a warning about the mismatch, but does not consider this a gross violation of the standard.MessageBase.deencapsulatedRtfhandles RTF data without a closing brace.extract_msg.encoding.utils.singleByteEncode()andextract_msg.encoding.utils.variableByteEncode().extract_msg.encoding.utils.singleByteEncode().extract_msg.encoding.utils.createSBEncoding()andextract_msg.encoding.utils.createVBEncoding().extract_msg.encoding.utils.