Bug 104973 - xdg-open can't handle URI schemes containing numbers
Summary: xdg-open can't handle URI schemes containing numbers
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: unspecified
Hardware: All All
: medium minor
Assignee: Portland Bugs
QA Contact:
Keywords: patch
Depends on:
Reported: 2018-02-06 19:25 UTC by Elliot Kendall
Modified: 2019-02-16 13:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Patch (751 bytes, patch)
2018-05-09 18:51 UTC, Gabriel Corona
Details | Splinter Review

Description Elliot Kendall 2018-02-06 19:25:39 UTC
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:


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:


This bug is present in the most recent version of xdg-open in git.
Comment 1 Rex Dieter 2018-02-06 19:35:14 UTC
Comment 2 Gabriel Corona 2018-05-09 18:51:00 UTC
Created attachment 139449 [details] [review]
Comment 3 GitLab Migration User 2019-02-16 13:39:51 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/122.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.