[MAGNOLIA-3150] SimpleUrlPattern do not accept all the chars accepted by Path.getValidatedLabel(String label) with UTF-8 enabled Created: 19/Mar/10  Updated: 01/Mar/16  Resolved: 21/Mar/10

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 4.3
Fix Version/s: 4.3.1

Type: Bug Priority: Major
Reporter: Luca Boati Assignee: Fabrizio Giustina
Resolution: Fixed Votes: 0
Labels: unicode
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
caused by MAGNOLIA-2929 Enhance unicode support Closed
is causing MAGNOLIA-3198 SimpleUrlPattern.URL_CHAR_PATTERN blo... Closed
duplicate
is duplicated by MAGNOLIA-3161 Some UTF-8 characters do not pass thr... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

If UTF-8 has been enabled, there are still a set of chars not accepted by SimpleUrlPattern (ex. ' char used everywhere by MS Word) .

SimpleUrlPattern use regEx: [
p

{L}


p

{Mn}


p

{S}

\\w!\"#$%&'*+,-./:; <=>?@`|~\\^\\(\\)

{\\}

\\[
]]

Adding UTF-8 support this regEx shuold be inverted, so it should accept all chars except a specified set.
the new regEx could be something like ^((?![<>]).)*$



 Comments   
Comment by Fabrizio Giustina [ 21/Mar/10 ]

Fixed by changing the wildcard pattern to simply "."

Note that the wildcard is also used in URI acls, so it should allow also any char, also if not supported for names in the jcr repository (users may simply need to have a servlet mapped to a path wth different chars, it's not nice to display the magnolia login page if the regexp doesn't accept it)

Generated at Mon Feb 12 03:43:40 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.