Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-standardwebhooks for openSUSE:Factory checked in at 2026-03-04 21:09:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-standardwebhooks (Old) and /work/SRC/openSUSE:Factory/.python-standardwebhooks.new.561 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-standardwebhooks" Wed Mar 4 21:09:33 2026 rev:2 rq:1336288 version:1.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-standardwebhooks/python-standardwebhooks.changes 2025-06-20 16:51:23.717188204 +0200 +++ /work/SRC/openSUSE:Factory/.python-standardwebhooks.new.561/python-standardwebhooks.changes 2026-03-04 21:10:17.733038939 +0100 @@ -1,0 +2,8 @@ +Wed Mar 4 08:36:57 UTC 2026 - Dirk Müller <[email protected]> + +- update to 1.0.1: + * Add support for jdk 8 + * fix(js): handle empty payloads in verify() + * feat(libraries/python): Support unpadded secrets + +------------------------------------------------------------------- Old: ---- standardwebhooks-1.0.0.tar.gz New: ---- standardwebhooks-1.0.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-standardwebhooks.spec ++++++ --- /var/tmp/diff_new_pack.AY1HDJ/_old 2026-03-04 21:10:20.981173182 +0100 +++ /var/tmp/diff_new_pack.AY1HDJ/_new 2026-03-04 21:10:21.001174008 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-standardwebhooks # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,27 +17,27 @@ Name: python-standardwebhooks -Version: 1.0.0 +Version: 1.0.1 Release: 0 Summary: Standard Webhooks License: MIT URL: https://github.com/standard-webhooks/standard-webhooks/tree/main/libraries/python Source: https://files.pythonhosted.org/packages/source/s/standardwebhooks/standardwebhooks-%{version}.tar.gz Source1: https://raw.githubusercontent.com/standard-webhooks/standard-webhooks/refs/heads/main/libraries/LICENSE -BuildRequires: python-rpm-macros BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools >= 40.8.0} BuildRequires: %{python_module wheel} +BuildRequires: python-rpm-macros # SECTION test requirements BuildRequires: %{python_module attrs >= 21.3.0} BuildRequires: %{python_module Deprecated} BuildRequires: %{python_module httpx >= 0.23.0} -BuildRequires: %{python_module python-dateutil} BuildRequires: %{python_module pytest} +BuildRequires: %{python_module python-dateutil} # /SECTION BuildRequires: fdupes -Requires: python-attrs >= 21.3.0 Requires: python-Deprecated +Requires: python-attrs >= 21.3.0 Requires: python-httpx >= 0.23.0 Requires: python-python-dateutil BuildArch: noarch ++++++ standardwebhooks-1.0.0.tar.gz -> standardwebhooks-1.0.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/standardwebhooks-1.0.0/PKG-INFO new/standardwebhooks-1.0.1/PKG-INFO --- old/standardwebhooks-1.0.0/PKG-INFO 2024-01-12 15:55:03.421332100 +0100 +++ new/standardwebhooks-1.0.1/PKG-INFO 2026-02-18 20:12:58.231174200 +0100 @@ -1,6 +1,6 @@ -Metadata-Version: 2.1 +Metadata-Version: 2.4 Name: standardwebhooks -Version: 1.0.0 +Version: 1.0.1 Summary: Standard Webhooks Author: Standard Webhooks License: MIT @@ -28,6 +28,15 @@ Requires-Dist: Deprecated Requires-Dist: types-python-dateutil Requires-Dist: types-Deprecated +Dynamic: author +Dynamic: classifier +Dynamic: description +Dynamic: description-content-type +Dynamic: keywords +Dynamic: license +Dynamic: requires-dist +Dynamic: requires-python +Dynamic: summary Python library for Standard Webhooks diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/standardwebhooks-1.0.0/standardwebhooks/__init__.py new/standardwebhooks-1.0.1/standardwebhooks/__init__.py --- old/standardwebhooks-1.0.0/standardwebhooks/__init__.py 2024-01-12 15:51:23.000000000 +0100 +++ new/standardwebhooks-1.0.1/standardwebhooks/__init__.py 2026-02-18 20:12:41.000000000 +0100 @@ -5,4 +5,4 @@ "WebhookVerificationError", ] -__version__ = "1.0.0" +__version__ = "1.0.1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/standardwebhooks-1.0.0/standardwebhooks/webhooks.py new/standardwebhooks-1.0.1/standardwebhooks/webhooks.py --- old/standardwebhooks-1.0.0/standardwebhooks/webhooks.py 2023-09-27 01:15:22.000000000 +0200 +++ new/standardwebhooks-1.0.1/standardwebhooks/webhooks.py 2026-02-18 20:12:41.000000000 +0100 @@ -26,7 +26,8 @@ if isinstance(whsecret, str): if whsecret.startswith(self._SECRET_PREFIX): whsecret = whsecret[len(self._SECRET_PREFIX) :] - self._whsecret = base64.b64decode(whsecret) + # add padding in case whsecret is unpadded base64 (b64decode skips extra padding) + self._whsecret = base64.b64decode(whsecret + "==") if isinstance(whsecret, bytes): self._whsecret = whsecret diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/standardwebhooks-1.0.0/standardwebhooks.egg-info/PKG-INFO new/standardwebhooks-1.0.1/standardwebhooks.egg-info/PKG-INFO --- old/standardwebhooks-1.0.0/standardwebhooks.egg-info/PKG-INFO 2024-01-12 15:55:03.000000000 +0100 +++ new/standardwebhooks-1.0.1/standardwebhooks.egg-info/PKG-INFO 2026-02-18 20:12:58.000000000 +0100 @@ -1,6 +1,6 @@ -Metadata-Version: 2.1 +Metadata-Version: 2.4 Name: standardwebhooks -Version: 1.0.0 +Version: 1.0.1 Summary: Standard Webhooks Author: Standard Webhooks License: MIT @@ -28,6 +28,15 @@ Requires-Dist: Deprecated Requires-Dist: types-python-dateutil Requires-Dist: types-Deprecated +Dynamic: author +Dynamic: classifier +Dynamic: description +Dynamic: description-content-type +Dynamic: keywords +Dynamic: license +Dynamic: requires-dist +Dynamic: requires-python +Dynamic: summary Python library for Standard Webhooks diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/standardwebhooks-1.0.0/tests/test_webhooks.py new/standardwebhooks-1.0.1/tests/test_webhooks.py --- old/standardwebhooks-1.0.0/tests/test_webhooks.py 2024-01-12 15:41:24.000000000 +0100 +++ new/standardwebhooks-1.0.1/tests/test_webhooks.py 2026-02-18 20:12:41.000000000 +0100 @@ -22,15 +22,15 @@ signature: str header: t.Dict[str, str] - def __init__(self, timestamp: datetime = datetime.now(tz=timezone.utc)): + def __init__(self, timestamp: datetime = datetime.now(tz=timezone.utc), secret: str = DEFAULT_SECRET): ts = str(floor(timestamp.timestamp())) to_sign = f"{DEFAULT_MSG_ID}.{ts}.{DEFAULT_PAYLOAD}".encode() - signature = base64.b64encode(hmac_data(base64.b64decode(DEFAULT_SECRET), to_sign)).decode("utf-8") + signature = base64.b64encode(hmac_data(base64.b64decode(secret), to_sign)).decode("utf-8") self.id = DEFAULT_MSG_ID self.timestamp = ts self.payload = DEFAULT_PAYLOAD - self.secret = DEFAULT_SECRET + self.secret = secret self.signature = signature self.header = { "webhook-id": DEFAULT_MSG_ID, @@ -159,6 +159,38 @@ json = wh.verify(test_payload.payload, test_payload.header) assert json["test"] == 2432232314 + + +def test_signature_verification_with_unpadded_secret() -> None: + # needs no padding + secret = "MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw" + test_payload = PayloadForTesting(secret=secret) + + wh = Webhook(secret) + json = wh.verify(test_payload.payload, test_payload.header) + assert json["test"] == 2432232314 + + # needs one padding + secret = "MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaS" + test_payload = PayloadForTesting(secret=secret + "=") + + wh = Webhook(secret) + json = wh.verify(test_payload.payload, test_payload.header) + assert json["test"] == 2432232314 + + # needs two padding + secret = "MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSwBr" + test_payload = PayloadForTesting(secret=secret + "==") + + wh = Webhook(secret) + json = wh.verify(test_payload.payload, test_payload.header) + assert json["test"] == 2432232314 + + # with prefix + wh = Webhook("whsec_" + secret) + + json = wh.verify(test_payload.payload, test_payload.header) + assert json["test"] == 2432232314 def test_sign_function() -> None:
