Skip to content

Commit 36bdfde

Browse files
authored
Update ms_entra.py
Fix GUID regex
1 parent 7a97059 commit 36bdfde

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

entra/rulesets/ms_entra.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ def _parameter_form_special_agent_ms_entra() -> Dictionary:
5252
field_size=FieldSize.LARGE,
5353
custom_validate=[
5454
MatchRegex(
55-
regex="^(?:\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-"
56-
"(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\}{0,1})$",
55+
regex="^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
5756
error_msg=Message("Tenant ID / Directory ID must be in 36-character GUID format."),
5857
),
5958
LengthInRange(
@@ -71,8 +70,7 @@ def _parameter_form_special_agent_ms_entra() -> Dictionary:
7170
field_size=FieldSize.LARGE,
7271
custom_validate=[
7372
MatchRegex(
74-
regex="^(?:\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-"
75-
"(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\}{0,1})$",
73+
regex="^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
7674
error_msg=Message("Client ID / Application ID must be in 36-character GUID format."),
7775
),
7876
LengthInRange(

0 commit comments

Comments
 (0)