[Portland-bugs] [Bug 104973] New: xdg-open can't handle URI schemes containing numbers
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Feb 6 19:25:39 UTC 2018
https://bugs.freedesktop.org/show_bug.cgi?id=104973
Bug ID: 104973
Summary: xdg-open can't handle URI schemes containing numbers
Product: Portland
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: medium
Component: xdg-utils
Assignee: portland-bugs at lists.freedesktop.org
Reporter: elliotkendall at gmail.com
Per RFC 3986, 'Scheme names consist of a sequence of characters beginning with
a
letter and followed by any combination of letters, digits, plus ("+"), period
("."), or hyphen ("-").' However, the is_file_url_or_path() function in
xdg-open relies on the following regular expression to identify valid URI
schemes:
^[[:alpha:]+\.\-]+:
Not only does that fail on URI schemes that contain numbers (such as h323,
irc6, pkcs11, tn3270, etc.) it also incorrectly identifies strings beginning
with + . or - as valid URIs.
I propose the following replacement:
^[:alpha:][[:alnum:]+\.\-]*:
This bug is present in the most recent version of xdg-open in git.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/portland-bugs/attachments/20180206/c59d3c11/attachment.html>
More information about the Portland-bugs
mailing list