Skip to content
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

Make the name check for dynamic field names more strict #2749

Closed
bschmalhofer opened this issue Dec 6, 2023 · 1 comment
Closed

Make the name check for dynamic field names more strict #2749

bschmalhofer opened this issue Dec 6, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bschmalhofer
Copy link
Contributor

The code in Kernel/System/DynamicFields.pm suggests that dynamic field names should be restricted to ASCII alphanumeric characters and '-'. But the current check allows for decimal digits from scripts like Arabic and Devanagar. So, let's tighten the check.

In the web interface the input field is checked to be alphanumeric. This check would complain about e.g. 'DF०१२३४५६७८९'. But client side checks can easily be disabled by users.

@bschmalhofer bschmalhofer added the enhancement New feature or request label Dec 6, 2023
@bschmalhofer bschmalhofer added this to the OTOBO 11.0 milestone Dec 6, 2023
@bschmalhofer bschmalhofer self-assigned this Dec 6, 2023
bschmalhofer added a commit that referenced this issue Dec 6, 2023
bschmalhofer added a commit that referenced this issue Dec 6, 2023
By adding the modifier 'a' for 'ASCII safe'.
The effect is the same as replacing '\d' with '[0-9]'.
Added a test case with a devangari digit.
bschmalhofer added a commit that referenced this issue Dec 6, 2023
bschmalhofer added a commit that referenced this issue Dec 6, 2023
By adding the modifier 'a' for 'ASCII safe'.
The effect is the same as replacing '\d' with '[0-9]'.
Added a test case with a devangari digit.
bschmalhofer added a commit that referenced this issue Dec 6, 2023
@bschmalhofer
Copy link
Contributor Author

Added the regex modifier 'a', so that '\d' is the same as '[0-9'. See https://perldoc.perl.org/perlre#/a-(and-/aa) . Closing this issue.

@bschmalhofer bschmalhofer changed the title Make the name check for dynamic fields more strict Make the name check for dynamic field names more strict Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant