Release 0.4.1 as a minor bugfix
PATCH 1/3 Release 0.4.1 as a minor bugfix
From: Konstantin Ryabitsev <[email protected]>
This returns better errors on brand new installs, so is worth a minor dot release.
Signed-off-by Konstantin Ryabitsev <[email protected]>
--- patatt/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
patatt/__init__.py +1 -1
@@ -47,7 +47,7 @@ OPT_HDRS = [b'message-id'] KEYCACHE = dict() # My version -__VERSION__ = '0.4.0' +__VERSION__ = '0.4.1' MAX_SUPPORTED_FORMAT_VERSION = 1
Signature · 1 line
2.31.1
PATCH 2/3 Perform bh validation first
From: Konstantin Ryabitsev <[email protected]>
Instead of doing bh validation as the last step, do it at the very start. This way we can recognize body content modifications early on before needing to do any signature validation at all.
Signed-off-by Konstantin Ryabitsev <[email protected]>
--- patatt/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
patatt/__init__.py +4 -3
@@ -188,6 +188,10 @@ class DevsigHeader: def validate(self, keyinfo: Union[str, bytes, None]) -> str: self.sanity_check() + # Start by validating the body hash. If it fails to match, we can + # bail early, before needing to do any signature validation. + if self.get_field('bh') != self._body_hash: + raise BodyValidationError('Body content validation failed') # Check that we have a b= field if not self.get_field('b'): raise RuntimeError('Missing "b=" value')
@@ -214,9 +218,6 @@ class DevsigHeader: vdigest = hashed.digest() if sdigest != vdigest: raise ValidationError('Header validation failed') - # Now validate body hash - if self.get_field('bh') != self._body_hash: - raise BodyValidationError('Body content validation failed') return signtime
Signature · 1 line
2.31.1
PATCH 3/3 Bump version to 0.4.2
In reply to Konstantin RyabitsevFrom: Konstantin Ryabitsev <[email protected]>
Preparing for b4 0.7.0 release.
Signed-off-by Konstantin Ryabitsev <[email protected]>
--- patatt/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
patatt/__init__.py +1 -1
@@ -47,7 +47,7 @@ OPT_HDRS = [b'message-id'] KEYCACHE = dict() # My version -__VERSION__ = '0.4.1' +__VERSION__ = '0.4.2' MAX_SUPPORTED_FORMAT_VERSION = 1
Signature · 1 line
2.31.1