Skip to content

Commit

Permalink
Update m365.py
Browse files Browse the repository at this point in the history
Fixed GUID regex
  • Loading branch information
CLiX-1 authored Jun 26, 2024
1 parent 6eca034 commit 5abb8aa
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions m365/rulesets/m365.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ def _parameter_form_m365() -> Dictionary:
field_size=FieldSize.LARGE,
custom_validate=[
MatchRegex(
regex="^(?:\{{0,1}(?:[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}\}{0,1})$",
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}$",
error_msg=Message("Tenant ID / Directory ID must be in 36-character GUID format."),
),
LengthInRange(
Expand All @@ -71,8 +70,7 @@ def _parameter_form_m365() -> Dictionary:
field_size=FieldSize.LARGE,
custom_validate=[
MatchRegex(
regex="^(?:\{{0,1}(?:[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}\}{0,1})$",
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}$",
error_msg=Message("Client ID / Application ID must be in 36-character GUID format."),
),
LengthInRange(
Expand Down

0 comments on commit 5abb8aa

Please sign in to comment.