Skip to content

Conversation

@murataslan1
Copy link
Contributor

Description

Fixes #6904

The DESCRIPTION_PATTERN regex was too restrictive, only allowing ASCII letters (a-zA-Z) and numbers (0-9). This prevented users from writing descriptions in non-English languages like Japanese, Turkish, Chinese, etc.

Changes

  • Updated regex to use Unicode character classes: \p{L} for letters and \p{N} for numbers
  • Added u (Unicode) modifier to the regex pattern
  • Updated error message to reflect that Unicode characters are allowed

Before

'/^[a-zA-Z0-9\s\-_.:\/()\'\",.!?@#%&+=[\]{}|~`*]+$/'

After

'/^[\p{L}\p{N}\s\-_.:\/()\'\",.!?@#%&+=[\]{}|~`*]+$/u'

Testing

Users can now write descriptions in their native languages (Japanese: こんにちは, Turkish: Türkçe, Chinese: 中文) while still maintaining security by restricting dangerous special characters.

Fixes coollabsio#6904

The DESCRIPTION_PATTERN regex was too restrictive, only allowing ASCII
letters (a-zA-Z) and numbers (0-9). This prevented users from writing
descriptions in non-English languages like Japanese, Turkish, Chinese, etc.

Changes:
- Updated regex to use Unicode character classes: \p{L} for letters and
  \p{N} for numbers
- Added 'u' (Unicode) modifier to the regex pattern
- Updated error message to reflect that Unicode characters are allowed

This allows users to write descriptions in their native languages while
still maintaining security by restricting dangerous special characters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Description validation is too strict, preventing the use of non-ASCII characters

1 participant