tests/audit_log: Correctly check for GUID
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 23 May 2023 04:42:54 +0000 (16:42 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 29 May 2023 22:32:28 +0000 (22:32 +0000)
Pattern.match() only checks the starting portion of the string.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/audit_log_base.py

index 18f86a9d31094e9b272fe3a739eac1b46ed7334e..8671f72e7b52ecbab31d4efcd2b39560e326da38 100644 (file)
@@ -190,7 +190,7 @@ class AuditLogTestBase(samba.tests.TestCase):
     # Is the supplied GUID string correctly formatted
     #
     def is_guid(self, guid):
-        return self.GUID_RE.match(guid)
+        return self.GUID_RE.fullmatch(guid)
 
     def get_session(self):
         return self.auth_context["sessionId"]