]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Add check for the GPO link to have at least two attributes separated by semicolumn...
authorAleksandr Sharov <asharov@redhat.com>
Fri, 4 Jul 2025 13:32:28 +0000 (15:32 +0200)
committerJule Anger <janger@samba.org>
Thu, 17 Jul 2025 10:48:14 +0000 (10:48 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15877
RN: Fix handling of empty GPO link

Singed-off-by: Alex Sharov (kororland@gmail.com)
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jul 10 18:55:33 UTC 2025 on atb-devel-224

(cherry picked from commit 44ee31c0258b0afb3d3f2ce17942cc86e308a690)

Autobuild-User(v4-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Thu Jul 17 10:48:14 UTC 2025 on atb-devel-224

python/samba/gp/gpclass.py

index d86aacec13877e0611a7e14720e1816f24f8c009..07b4fb3e7bd06e5fcae8a12ef4144c2f7ca74365 100644 (file)
@@ -673,8 +673,10 @@ class GP_LINK:
         self.gp_opts = int(gPOptions)
 
     def gpo_parse_gplink(self, gPLink):
+        # normally formed link looks like [LDAP://host/path;options]
+        # empty link looks like [ ]
         for p in gPLink.decode().split(']'):
-            if not p:
+            if not p or ';' not in p:
                 continue
             log.debug('gpo_parse_gplink: processing link')
             p = p.lstrip('[')