diff options
author | mjk <mjk@disroot.org> | 2022-11-01 17:38:55 +0300 |
---|---|---|
committer | mjk <mjk@disroot.org> | 2022-11-06 00:18:52 +0300 |
commit | 69af2ce6ac259d85b4979ac16ebdd6760d920ed1 (patch) | |
tree | 1636c464f10f801dc3bdc9ead1901b616c414eee /test | |
parent | f0feaba1ff281a92ff7704b8a1ae143f5300e481 (diff) |
imprv: URI parsing: Detect invalid file URIs earlier
...including: in chat messages and file sending UI.
Also, don't generate wrong URIs like 'file://file:/path' when opening
'file:/path', and properly escape paths: 'file:///¿Qué%3F' <- '/¿Qué?'.
Diffstat (limited to 'test')
-rw-r--r-- | test/no_gui/test_styling.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/no_gui/test_styling.py b/test/no_gui/test_styling.py index 6579bfb8f..287eac166 100644 --- a/test/no_gui/test_styling.py +++ b/test/no_gui/test_styling.py @@ -303,6 +303,11 @@ URIS = [ 'xmpp:romeo@montague.net?message;subject=Test%20Message;body=Here%27s%20a%20test%20message', 'geo:1,2', 'geo:1,2,3', + 'file:/foo/bar/baz', # xffm + 'file:///foo/bar/baz', # nautilus, rox + 'file:///x:/foo/bar/baz', # windows + 'file://localhost/foo/bar/baz', + 'file://nonlocalhost/foo/bar/baz', # These seem to be from https://mathiasbynens.be/demo/url-regex 'http://foo.com/blah_blah', @@ -417,6 +422,11 @@ UNACCEPTABLE_URIS = [ 'geo:,2,', 'geo:,,3', 'geo:,,', + + 'file:', + 'file:a', + 'file:a/', + 'file:a/b', ] |