Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pyspnego for openSUSE:Factory 
checked in at 2026-03-05 17:29:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pyspnego (Old)
 and      /work/SRC/openSUSE:Factory/.python-pyspnego.new.561 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pyspnego"

Thu Mar  5 17:29:54 2026 rev:21 rq:1336672 version:0.12.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pyspnego/python-pyspnego.changes  
2025-09-14 18:50:54.903956084 +0200
+++ /work/SRC/openSUSE:Factory/.python-pyspnego.new.561/python-pyspnego.changes 
2026-03-05 17:32:05.904810849 +0100
@@ -1,0 +2,6 @@
+Wed Mar  4 19:56:50 UTC 2026 - Martin Hauke <[email protected]>
+
+- Update to version 0.12.1
+  * Fix up NTLM Single Host unpacking.
+
+-------------------------------------------------------------------

Old:
----
  pyspnego-0.12.0.tar.gz

New:
----
  pyspnego-0.12.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pyspnego.spec ++++++
--- /var/tmp/diff_new_pack.SDGb2s/_old  2026-03-05 17:32:06.732845288 +0100
+++ /var/tmp/diff_new_pack.SDGb2s/_new  2026-03-05 17:32:06.732845288 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pyspnego
 #
-# Copyright (c) 2025 SUSE LLC and contributors
+# 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
@@ -23,7 +23,7 @@
 %endif
 %{?sle15_python_module_pythons}
 Name:           python-pyspnego
-Version:        0.12.0
+Version:        0.12.1
 Release:        0
 Summary:        Python SPNEGO authentication library
 License:        MIT

++++++ pyspnego-0.12.0.tar.gz -> pyspnego-0.12.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyspnego-0.12.0/.github/workflows/ci.yml 
new/pyspnego-0.12.1/.github/workflows/ci.yml
--- old/pyspnego-0.12.0/.github/workflows/ci.yml        2025-09-02 
20:21:12.000000000 +0200
+++ new/pyspnego-0.12.1/.github/workflows/ci.yml        2026-03-02 
20:15:11.000000000 +0100
@@ -25,14 +25,14 @@
     name: build sdist and universal wheel
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v5
+    - uses: actions/checkout@v6
 
     - name: build sdist and universal wheel
       run: |
         python -m pip install build
         python -m build
 
-    - uses: actions/upload-artifact@v4
+    - uses: actions/upload-artifact@v7
       with:
         name: artifact
         path: ./dist/*
@@ -48,7 +48,7 @@
       matrix:
         os:
         - ubuntu-latest
-        - macOS-13
+        - macOS-15-intel
         - macOS-latest
         - windows-latest
         python-version:
@@ -57,7 +57,7 @@
         - '3.11'
         - '3.12'
         - '3.13'
-        - '3.14-dev'
+        - '3.14'
         python-arch:
         - x86
         - x64
@@ -75,13 +75,13 @@
         - os: ubuntu-latest
           gssapi-provider: sspi
 
-        - os: macOS-13
+        - os: macOS-15-intel
           python-arch: x86
-        - os: macOS-13
+        - os: macOS-15-intel
           python-arch: arm64
-        - os: macOS-13
+        - os: macOS-15-intel
           gssapi-provider: mit
-        - os: macOS-13
+        - os: macOS-15-intel
           gssapi-provider: sspi
 
         - os: macOS-latest
@@ -103,14 +103,14 @@
           gssapi-provider: heimdal
 
     steps:
-    - uses: actions/checkout@v5
+    - uses: actions/checkout@v6
 
-    - uses: actions/setup-python@v5
+    - uses: actions/setup-python@v6
       with:
         python-version: ${{ matrix.python-version }}
         architecture: ${{ matrix.python-arch }}
 
-    - uses: actions/download-artifact@v5
+    - uses: actions/download-artifact@v8
       with:
         name: artifact
         path: ./dist
@@ -137,14 +137,14 @@
 
     - name: Upload Test Results
       if: always()
-      uses: actions/upload-artifact@v4
+      uses: actions/upload-artifact@v7
       with:
         name: Unit Test Results (${{ matrix.os }} ${{ matrix.python-version }} 
${{ matrix.python-arch }} ${{ matrix.gssapi-provider }})
         path: ./junit/test-results.xml
 
     - name: Upload Coverage Results
       if: always()
-      uses: actions/upload-artifact@v4
+      uses: actions/upload-artifact@v7
       with:
         name: Coverage Results (${{ matrix.os }} ${{ matrix.python-version }} 
${{ matrix.python-arch }} ${{ matrix.gssapi-provider }})
         path: ./coverage.xml
@@ -167,7 +167,7 @@
       id-token: write
 
     steps:
-    - uses: actions/download-artifact@v5
+    - uses: actions/download-artifact@v8
       with:
         name: artifact
         path: ./dist
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyspnego-0.12.0/CHANGELOG.md 
new/pyspnego-0.12.1/CHANGELOG.md
--- old/pyspnego-0.12.0/CHANGELOG.md    2025-09-02 20:21:12.000000000 +0200
+++ new/pyspnego-0.12.1/CHANGELOG.md    2026-03-02 20:15:11.000000000 +0100
@@ -1,5 +1,10 @@
 # Changelog
 
+## 0.12.1 - 2026-03-03
+
+* Fix NTLM challenge parser when the `TargetInfo` contains extra data for 
`Single_Host_Data`
+  * Windows 11 24H2 is sending at least 80 bytes and as we don't use this data 
we don't care if it doesn't fit a specific size
+
 ## 0.12.0 - 2025-09-03
 
 * Drop support for Python 3.7 - new minimum is 3.9+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyspnego-0.12.0/src/spnego/_ntlm_raw/messages.py 
new/pyspnego-0.12.1/src/spnego/_ntlm_raw/messages.py
--- old/pyspnego-0.12.0/src/spnego/_ntlm_raw/messages.py        2025-09-02 
20:21:12.000000000 +0200
+++ new/pyspnego-0.12.1/src/spnego/_ntlm_raw/messages.py        2026-03-02 
20:15:11.000000000 +0100
@@ -1023,8 +1023,8 @@
         _b_data: typing.Optional[bytes] = None,
     ) -> None:
         if _b_data:
-            if len(_b_data) != 48:
-                raise ValueError("SingleHost bytes must have a length of 48")
+            if len(_b_data) < 8:
+                raise ValueError("SingleHost bytes must have at least a length 
of 8")
             self._data = memoryview(_b_data)
 
         else:
@@ -1061,23 +1061,27 @@
 
     @property
     def custom_data(self) -> bytes:
-        return self._data[8:16].tobytes()
+        return self._data[8:16].tobytes() if len(self._data) >= 16 else b""
 
     @custom_data.setter
     def custom_data(self, value: bytes) -> None:
         if len(value) != 8:
             raise ValueError("custom_data length must be 8 bytes long")
+        if len(self._data) < 16:
+            raise ValueError("cannot set custom_data on a SingleHost with less 
than 16 bytes of data")
 
         self._data[8:16] = value
 
     @property
     def machine_id(self) -> bytes:
-        return self._data[16:48].tobytes()
+        return self._data[16:48].tobytes() if len(self._data) >= 48 else b""
 
     @machine_id.setter
     def machine_id(self, value: bytes) -> None:
         if len(value) != 32:
             raise ValueError("machine_id length must be 32 bytes long")
+        if len(self._data) < 48:
+            raise ValueError("cannot set machine_id on a SingleHost with less 
than 48 bytes of data")
 
         self._data[16:48] = value
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyspnego-0.12.0/src/spnego/_version.py 
new/pyspnego-0.12.1/src/spnego/_version.py
--- old/pyspnego-0.12.0/src/spnego/_version.py  2025-09-02 20:21:12.000000000 
+0200
+++ new/pyspnego-0.12.1/src/spnego/_version.py  2026-03-02 20:15:11.000000000 
+0100
@@ -1,4 +1,4 @@
 # Copyright: (c) 2020, Jordan Borean (@jborean93) <[email protected]>
 # MIT License (see LICENSE or https://opensource.org/licenses/MIT)
 
-__version__ = "0.12.0"
+__version__ = "0.12.1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyspnego-0.12.0/tests/_ntlm_raw/test_messages.py 
new/pyspnego-0.12.1/tests/_ntlm_raw/test_messages.py
--- old/pyspnego-0.12.0/tests/_ntlm_raw/test_messages.py        2025-09-02 
20:21:12.000000000 +0200
+++ new/pyspnego-0.12.1/tests/_ntlm_raw/test_messages.py        2026-03-02 
20:15:11.000000000 +0100
@@ -1380,7 +1380,7 @@
 
 
 def test_single_host_invalid_size():
-    with pytest.raises(ValueError, match="SingleHost bytes must have a length 
of 48"):
+    with pytest.raises(ValueError, match="SingleHost bytes must have at least 
a length of 8"):
         messages.SingleHost.unpack(b_data=b"\x00")
 
 
@@ -1412,6 +1412,13 @@
     assert actual.machine_id == b"\x02" * 32
 
 
+def test_single_host_unpack_extra_data():
+    data = b"\x00" * 48 + b"\x11\x11\x11"
+    sh = messages.SingleHost.unpack(data)
+    actual = sh.pack()
+    assert actual == data
+
+
 def test_single_host_eq():
     assert messages.SingleHost.unpack(b"\x00" * 48) == b"\x00" * 48
     assert messages.SingleHost.unpack(b"\x00" * 48) != b"\x11" * 48
@@ -1419,6 +1426,28 @@
     assert messages.SingleHost.unpack(b"\x00" * 48) == 
messages.SingleHost.unpack(b"\x00" * 48)
 
 
+def test_single_host_custom_data_empty():
+    single_host = messages.SingleHost.unpack(b"\x00" * 15)
+    assert single_host.custom_data == b""
+
+
+def test_single_host_custom_data_buffer_not_large_enough():
+    single_host = messages.SingleHost.unpack(b"\x00" * 15)
+    with pytest.raises(ValueError, match="cannot set custom_data on a 
SingleHost with less than 16 bytes of data"):
+        single_host.custom_data = b"\x00\x00\x00\x00\x00\x00\x00\x00"
+
+
+def test_single_host_machine_id_empty():
+    single_host = messages.SingleHost.unpack(b"\x00" * 47)
+    assert single_host.machine_id == b""
+
+
+def test_single_host_machine_id_buffer_not_large_enough():
+    single_host = messages.SingleHost.unpack(b"\x00" * 47)
+    with pytest.raises(ValueError, match="cannot set machine_id on a 
SingleHost with less than 48 bytes of data"):
+        single_host.machine_id = b"\x00" * 32
+
+
 def test_version_pack():
     version = messages.Version(major=1, minor=2, build=3, revision=4)
     assert version.major == 1

Reply via email to