TS 29.571: regex pattern allows all non-empty strings and will not apply restrictions as intended #106
Labels
3GPP Rel-17
Issues relating to 3GPP Release 17 specifications.
3GPP TS 29.571
Issues relating to CT4's "Common Data Types for Service Based Interfaces" specification.
Adopted
Correction
Improvement
Projects
Description
Several string types in TS 29.571 use a regular expression
pattern
to restrict the allowed strings and some of these contain a catch all "^(…|.+)$" style pattern. However the inclusion of "^.+$" as one of the options will override any other rules in the regex.This happens on the following defined types defined in TS 29.571:
VarUeId
VarUeIdRm
Gpsi
GpsiRm
Pei
PeiRm
Supi
SupiRm
SupiOrSuci
Suggested solution
The ".+" regex option should be preceded with an assertion operator to exclude the prefixes of other parts of the same regex option. For example for the
VarUeId
an assertion excluding strings starting with "imsi-", "nai-", "msisdn-", "extid-", "gci-" and "gli-" should be included in with the ".+" making that part "(?!(?:imsi|nai|msisdn|extid|gci|gli)-).+" and the whole regex would beThe "(?!…)" operator acts a non-consuming negative assertion meaning that the next part of the string must not match the ellipsis part and this will exclude patterns already matches by previous pattern options. The part matched by the contents of "(?!…)" are not counted towards the final pattern match and are just an assertion about the string contents to match.
Additional context
This issue also applies to some types in the following specifications too:
The text was updated successfully, but these errors were encountered: