Fixed
Details
Priority
MajorFix versions
Components
Assignee
Matthew JonesMatthew JonesReporter
Kristine TowneKristine Towne
Details
Details
Priority
Fix versions
Components
Assignee
Matthew Jones
Matthew JonesReporter
Kristine Towne
Kristine TowneCreated March 1, 2021 at 12:01 AM
Updated April 4, 2021 at 5:07 PM
Resolved April 4, 2021 at 5:07 PM
After the update to commons validator on https://sakaiproject.atlassian.net/browse/SAK-44089#icft=SAK-44089 to 1.7, a "feature" of web content to do parameter replacement is no longer working. (See test plan)
I believe this is because of https://issues.apache.org/jira/browse/VALIDATOR-472 (UrlValidator should not be more lax than java.net.URI) and curly braces not being valid in URI's.
I don't know how popular this feature is, but I found an email thread about it from 10 years ago. One idea I have to fix this is to validate on the replaced values and still just persist the original string. It might be nice if it could also validate if the values, so it would have a different error message if a parameter is incorrect or cannot be replaced. (Still containing braces). It could also URLEncode the URL and maybe do a replacement using the encoded (%7B and %7D) strings. Not entirely sure how it's implemented.
Here's some more info on characters not allowed. I'm not sure if anything else would break with this change: https://meta.stackexchange.com/a/79060
A better fix might be to just drop the braces? $USER_ID is basically the same as ${USER_ID} Though that might need a conversion of some kind for existing URL's? Or could have used a valid character like parenthesis.