Why paths defined in webrestrictions.xml can't contain numbers?
Open
@engcom-Hotel is already working on this.
Since Aug 13, 2025.
feature request
Progress: ready for grooming
Reported on 2.4.x
Triage: Dev.Experience
- Dominant language
- PHP
- Stars
- 12.2k
- Forks
- 9.4k
- PR merge metrics
- No merged PRs in 30d
Description
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 https://github.com/magento/magento2/issues/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”.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.