Skip to content

Commit 43b1d35

Browse files
committed
Handle win 2025 encoding
1 parent 58cedb3 commit 43b1d35

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

winlogbeat/tests/system/test_wineventlog.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -457,14 +457,19 @@ def test_multiline_events(self):
457457
"""
458458
wineventlog - Event with newlines and control characters
459459
"""
460-
msg = """
460+
account_name = "MS4\x1e$"
461+
# Windows 2025 Server encodes message differently
462+
if platform.platform().startswith("Windows-2025"):
463+
account_name = "MS4_$"
464+
465+
msg = f"""
461466
A trusted logon process has been registered with the Local Security Authority.
462467
This logon process will be trusted to submit logon requests.
463468
464469
Subject:
465470
466471
Security ID: SYSTEM
467-
Account Name: MS4\x1e$
472+
Account Name: {account_name}
468473
Account Domain: WORKGROUP
469474
Logon ID: 0x3e7
470475
Logon Process Name: IKE"""

0 commit comments

Comments
 (0)