Skip to content

Why paths defined in webrestrictions.xml can't contain numbers? #39786

@pitbulk

Description

@pitbulk

Summary

In the Magento enterprise module Webrestriction, at etc/webrestrictions.xsd can be found the pattern:

<xs:restriction base="xs:string">
  <xs:pattern value="[a-zA-Z_]+" />
</xs:restriction>

Is there any reason for not accepting numbers?

I see that in the past similar flexibility was added on other modules, for example the ImportExport.
See #4470

Can we have a similar change applied on Webrestriction module (Enterprise)?

Examples

In my extension I defined actions path as follows:

<action path="pitbulk_saml2_account_forcelogin" type="generic"/>

so I receive the error:

etc/webrestrictions.xml Element 'action', attribute 'path': [facet 'pattern'] The value 'pitbulk_saml2_account_forcelogin' is not accepted by the pattern '[a-zA-Z_]+'.

Proposed solution

Change the pattern:

<xs:restriction base="xs:string">
  <xs:pattern value="[a-zA-Z0-9_]+" />
</xs:restriction>

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions