Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pitbulk opened this issue Apr 3, 2025 · 1 comment
Open

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

pitbulk opened this issue Apr 3, 2025 · 1 comment
Labels
Reported on 2.4.x Indicates original Magento version for the Issue report. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it

Comments

@pitbulk
Copy link

pitbulk commented Apr 3, 2025

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._
- [x] 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”._
@pitbulk pitbulk added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Apr 3, 2025
Copy link

m2-assistant bot commented Apr 3, 2025

Hi @pitbulk. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce.


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@engcom-Bravo engcom-Bravo added the Reported on 2.4.x Indicates original Magento version for the Issue report. label Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reported on 2.4.x Indicates original Magento version for the Issue report. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
None yet
Development

No branches or pull requests

2 participants