Function isValid for URLs does not validate SharePoint/Office365 links properly

Description

Issue

The following function returns false, but should return true:

Details

SharePoint/Office365 allows users to share items via URL. These generated URLs contain a simple combination of characters that are returned invalid by isValid. Example URL:

https://companyname.sharepoint.com/:f:/s/site-collection-name/subsite-name/Ds10TaJKAKhMp1hE0B_42WcBVhTHD3EQJKWhGprKFP3vpQ?e=14ohmf

In this example, the :f:, which denotes a shared folder, is considered invalid. Other example designations used by SharePoint:

  • :w: for Word

  • :x: for Excel

  • :p: for PowerPoint

  • :b: for PDF

Environment

None

Activity

Show:
Pothys - MitrahSoft
February 13, 2020, 5:58 PM

I've checked and confirmed the issue that happened on lucee and also I added a fix for this ticket.

Pull request: https://github.com/lucee/Lucee/pull/844

Ivan McAvinchey
October 5, 2020, 5:33 PM

Just to add, this is an issue I’ve run up against as well. It’s the colon, as Pothys has fixed in his pull request.

Wikipedia URLs such as https://en.wikipedia.org/wiki/Talk:Lucee fail validation, as do FW/1 URLs that commonly use colons for subsystems.

Michael Offner
December 19, 2020, 3:47 AM

Michael Offner
December 19, 2020, 3:47 AM

please give the build a try

Pothys - MitrahSoft
December 23, 2020, 6:59 PM

, I've checked this ticket and the issue was solved in lucee latest version 5.3.8.129-SNAPSHOT. Now, isValid for URL works fine. And I added a fixed version too.

Fixed

Assignee

Pothys - MitrahSoft

Reporter

Keith Setliff

Priority

Minor

Labels

Fix versions

Affects versions