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

Description

Issue

The following function returns false, but should return true:

isValid("url", "https://companyname.sharepoint.com/:f:/s/site-collection-name/subsite-name/Ds10TaJKAKhMp1hE0B_42WcBVhTHD3EQJKWhGprKFP3vpQ?e=14ohmf")

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 23 December 2020 at 07:59

, 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.

Michael Offner 18 December 2020 at 16:47

please give the build a try

Ivan McAvinchey 5 October 2020 at 06:33

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.

Pothys - MitrahSoft 13 February 2020 at 06:58

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

Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 12 February 2020 at 21:09
Updated 8 February 2021 at 10:50
Resolved 23 December 2020 at 08:00

Flag notifications