After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 779449 - util: Change URL matching (again)
util: Change URL matching (again)
Status: RESOLVED FIXED
Product: polari
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Polari maintainers
Polari maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-02 00:58 UTC by Florian Müllner
Modified: 2017-03-04 21:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
util: Change URL matching (again) (2.11 KB, patch)
2017-03-02 00:58 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2017-03-02 00:58:52 UTC
See patch.
Comment 1 Florian Müllner 2017-03-02 00:58:59 UTC
Created attachment 347013 [details] [review]
util: Change URL matching (again)

Commit 094d7d1cc11 changed the URL regex to match any scheme under
the assumption that false positives would be rare. While this may
be true for schemes://, it turns out that trying to match colon-only
schemes generically commonly produces matches for random stuff that's
not a URL - someone not adding a whitespace after a mention, explaining
that server:port can be used to configure non-default ports, ...

So probably the best we can do is to keep allowing all schemes://, and
then whitelist a selected list of colon-only schemes. (Of course we
could go back to generating the list from the installed applications
when not running under flatpak, but let's try to keep the differences
between sandboxed and unsandboxed as small as possible).
Comment 2 Bastian Ilsø 2017-03-04 00:19:29 UTC
Review of attachment 347013 [details] [review]:

looks good to me
Comment 3 Florian Müllner 2017-03-04 21:51:11 UTC
Attachment 347013 [details] pushed as a08ed09 - util: Change URL matching (again)