From 9c61d62adcbcd333406e790ac23bff299654a939 Mon Sep 17 00:00:00 2001 From: TheElementalOfDestruction Date: Thu, 9 Nov 2023 18:07:46 -0800 Subject: [PATCH] fix #394 --- CHANGELOG.md | 3 +++ README.rst | 4 ++-- extract_msg/__init__.py | 4 ++-- extract_msg/properties/prop.py | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc79d7ee..8c90f960 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +**v0.46.1** +* [[TeamMsgExtractor #394](https://github.com/TeamMsgExtractor/msg-extractor/issues/394)] Fix typo in props that caused the wrong number of bytes to be given to a struct. + **v0.46.0** * [[TeamMsgExtractor #95](https://github.com/TeamMsgExtractor/msg-extractor/issues/95)] Adjusted the `overrideEncoding` property of `MSGFile` to allow automatic encoding detection. Simply set the property to the string `"chardet"` and, assuming the `chardet` module is installed, it will analyze a number of the strings to try and form a consensus about the encoding. This will *ignore* the specified encoding *only if* if successfully detects. Otherwise it will log a warning and fall back to the default behavior. * [[TeamMsgExtractor #387](https://github.com/TeamMsgExtractor/msg-extractor/issues/387)] Changed `extract_msg.utils.decodeRfc2047` to not throw decoding errors if the content given is not ASCII. diff --git a/README.rst b/README.rst index 22962c0c..29d1e368 100644 --- a/README.rst +++ b/README.rst @@ -259,8 +259,8 @@ your access to the newest major version of extract-msg. .. |License: GPL v3| image:: https://img.shields.io/badge/License-GPLv3-blue.svg :target: LICENSE.txt -.. |PyPI3| image:: https://img.shields.io/badge/pypi-0.46.0-blue.svg - :target: https://pypi.org/project/extract-msg/0.46.0/ +.. |PyPI3| image:: https://img.shields.io/badge/pypi-0.46.1-blue.svg + :target: https://pypi.org/project/extract-msg/0.46.1/ .. |PyPI2| image:: https://img.shields.io/badge/python-3.8+-brightgreen.svg :target: https://www.python.org/downloads/release/python-3816/ diff --git a/extract_msg/__init__.py b/extract_msg/__init__.py index da194a14..51fa1d0b 100644 --- a/extract_msg/__init__.py +++ b/extract_msg/__init__.py @@ -27,8 +27,8 @@ # along with this program. If not, see . __author__ = 'Destiny Peterson & Matthew Walker' -__date__ = '2023-11-08' -__version__ = '0.46.0' +__date__ = '2023-11-09' +__version__ = '0.46.1' __all__ = [ # Modules: diff --git a/extract_msg/properties/prop.py b/extract_msg/properties/prop.py index e233e098..f3846fad 100644 --- a/extract_msg/properties/prop.py +++ b/extract_msg/properties/prop.py @@ -107,7 +107,7 @@ def _parseType(self, _type : int, stream : bytes, raw : bytes) -> Any: logger.warning('Property type is PtypNull, but is not equal to 0.') value = None elif _type == 0x0002: # PtypInteger16 - value = constants.st.ST_LE_I16.unpack(value[:3])[0] + value = constants.st.ST_LE_I16.unpack(value[:2])[0] elif _type == 0x0003: # PtypInteger32 value = constants.st.ST_LE_I32.unpack(value[:4])[0] elif _type == 0x0004: # PtypFloating32