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 551857 - Handle properly external protocols like apt:// or magnet://
Handle properly external protocols like apt:// or magnet://
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: [obsolete] URL bar
2.23.x
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
: 551959 668458 669568 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-09-11 19:22 UTC by Baptiste Mille-Mathias
Modified: 2012-02-07 13:11 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
jokosher (9.80 KB, image/png)
2008-09-11 19:23 UTC, Baptiste Mille-Mathias
  Details
Don't handle mailto as a web scheme (940 bytes, patch)
2010-01-21 00:44 UTC, Diego Escalante Urrelo (not reading bugmail)
accepted-commit_now Details | Review
Use gtk_show_uri to handle unknown uri schemas (1.35 KB, patch)
2010-01-21 00:44 UTC, Diego Escalante Urrelo (not reading bugmail)
accepted-commit_now Details | Review
Don't use SoupURI in normalize_or_autosearch_url (2.04 KB, patch)
2010-01-21 00:45 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
Handle non web schemas in ephy-web-view (3.32 KB, patch)
2010-01-21 00:45 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
ephy-embed-utils: mailto is not a web scheme (1000 bytes, patch)
2012-01-23 16:41 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review
ephy-window: pass non-web schemas to gtk_show_uri (1.33 KB, patch)
2012-01-23 16:41 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review
ephy-web-view: only autosearch input without scheme (2.35 KB, patch)
2012-01-23 16:41 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review

Description Baptiste Mille-Mathias 2008-09-11 19:22:12 UTC
go on http://www.jokosher.org/download there is a link apt://jokosher (Jokosher 0.10 for Ubuntu 8.10 (Intrepid Ibex)); 
clik on it and it produce a window without text;
Comment 1 Baptiste Mille-Mathias 2008-09-11 19:23:05 UTC
Created attachment 118535 [details]
jokosher 

this is a action window without label
Comment 2 Diego Escalante Urrelo (not reading bugmail) 2008-09-11 19:42:29 UTC
That's something custom to ubuntu for sure, I'm using gnome-2-24 from svn and I just get 'apt is not a registered protocol'.
Comment 3 Baptiste Mille-Mathias 2008-09-23 19:46:00 UTC
it happens also with xmpp: link, xmpp:eric@extremeboredom.net?message on http://eric.extremeboredom.net/about per instance 
Comment 4 Xan Lopez 2009-03-11 10:52:30 UTC
*** Bug 551959 has been marked as a duplicate of this bug. ***
Comment 5 Mattias Bengtsson 2009-12-19 22:44:27 UTC
The original report was probably filed against the old gecko version, but this is still true for the new webkit build.
Say i run "xdg-open spotify:somesonghash" and it opens the song-URL up in spotify, then it should open it in spotify when i run the url in Epiphany but it doesn't. (The url handler was added to gconf manually fwiw).
Comment 6 Diego Escalante Urrelo (not reading bugmail) 2009-12-19 22:53:30 UTC
Well I guess we could pass unknown schemes to gtk_show_uri. I wonder if it's safe though.
Right now irc: searches google although it's registered for pidgin, for example.
Comment 7 Reinout van Schouwen 2009-12-20 09:46:59 UTC
(In reply to comment #6)
> Well I guess we could pass unknown schemes to gtk_show_uri.

That's probably not such a bad idea, if only for the ftp:// protocol that we still don't support in Webkit...
Comment 8 Diego Escalante Urrelo (not reading bugmail) 2010-01-21 00:44:49 UTC
Created attachment 151902 [details] [review]
Don't handle mailto as a web scheme

mailto: is not precisely a web scheme, it was being handled as one by
ephy_embed_utils_address_has_web_scheme().

Bug #551857
Comment 9 Diego Escalante Urrelo (not reading bugmail) 2010-01-21 00:44:56 UTC
Created attachment 151903 [details] [review]
Use gtk_show_uri to handle unknown uri schemas

In policy_decision_required_cb() we were only considering mailto: as a case
that should be handled by gtk_show_uri, we now let every non web scheme to be
handled by gtk_show_uri. This enables xmpp:, apt: and similar links to work.
Also use a proper GdkScreen for gtk_show_uri().

Bug #551857
Comment 10 Diego Escalante Urrelo (not reading bugmail) 2010-01-21 00:45:00 UTC
Created attachment 151904 [details] [review]
Don't use SoupURI in normalize_or_autosearch_url

Change the logic to check if the url has no web scheme nor an unknown scheme.
Previously we were autoserching when the url had no scheme or an unknown
scheme.

Bug #551857
Comment 11 Diego Escalante Urrelo (not reading bugmail) 2010-01-21 00:45:05 UTC
Created attachment 151905 [details] [review]
Handle non web schemas in ephy-web-view

Centralize our handling of non web schemas.

Bug #551857
Comment 12 Diego Escalante Urrelo (not reading bugmail) 2010-01-21 00:51:14 UTC
The attached patches implement passing unknown web schemes to gtk_show_uri, one problem I haven't got around though is that typying "javascript:alert(1)" (for example) and hitting control+enter gives you a blank tab with a permanent 'loading status' and blank location entry. This both UI quirks should be fixable with a single thing I guess... like a false load_finished or something. Ideas?
Comment 13 Xan Lopez 2012-01-23 10:09:10 UTC
*** Bug 668458 has been marked as a duplicate of this bug. ***
Comment 14 Xan Lopez 2012-01-23 11:09:40 UTC
Review of attachment 151902 [details] [review]:

This one seems sensible.
Comment 15 Xan Lopez 2012-01-23 11:18:56 UTC
Review of attachment 151903 [details] [review]:

This seems like the obvious fix, yes. One question, that we can fix in a follow-up:

Chrome warns you about the fact that it is about to launch an external program to do some random thing, in case you were not aware of it. I think we should do the same if the reason in the policy cb is not LINK_CLICKED. Otherwise ephy could end up randomly opening programs by itself.
Comment 16 Diego Escalante Urrelo (not reading bugmail) 2012-01-23 16:41:19 UTC
Created attachment 205898 [details] [review]
ephy-embed-utils: mailto is not a web scheme
Comment 17 Diego Escalante Urrelo (not reading bugmail) 2012-01-23 16:41:30 UTC
Created attachment 205899 [details] [review]
ephy-window: pass non-web schemas to gtk_show_uri

Handle every non-web scheme in policy_decision_required_cb with
gtk_show_uri. This enables xmpp:, apt: and similar links to work.
Comment 18 Diego Escalante Urrelo (not reading bugmail) 2012-01-23 16:41:48 UTC
Created attachment 205900 [details] [review]
ephy-web-view: only autosearch input without scheme

Create an autosearch from the user input only when it has no scheme at
all.
Comment 19 Diego Escalante Urrelo (not reading bugmail) 2012-01-23 16:44:46 UTC
Ok. This new set is just a rebase and update of commit message.

The third one had a major facelift regarding explaining what the hell it does.
It enables non-web schemas for urls that are loaded into the EphyWebView by means other than policy-requests (usual navigation). So for example the location bar can now take mailto:, mms://, etc. If you were to load something with EphyWebView API, it should work too.

On the light of this, the 4th old patch is not needed, it's just a cleanup and refactoring to have a unique place to handle this situations.
Comment 20 Xan Lopez 2012-01-23 16:50:38 UTC
Review of attachment 205898 [details] [review]:

Yes, again :p
Comment 21 Xan Lopez 2012-01-23 16:51:22 UTC
Review of attachment 205899 [details] [review]:

Yes.
Comment 22 Diego Escalante Urrelo (not reading bugmail) 2012-01-23 16:55:53 UTC
Comment on attachment 151905 [details] [review]
Handle non web schemas in ephy-web-view

not that much of an improvement. marking obsolete.
Comment 23 Xan Lopez 2012-01-23 16:56:34 UTC
Review of attachment 205900 [details] [review]:

This looks good too.
Comment 24 Diego Escalante Urrelo (not reading bugmail) 2012-01-23 17:12:07 UTC
Done. Thanks!

Attachment 205898 [details] pushed as 0e7ecc4 - ephy-embed-utils: mailto is not a web scheme
Attachment 205899 [details] pushed as 607017e - ephy-window: pass non-web schemas to gtk_show_uri
Attachment 205900 [details] pushed as 205a292 - ephy-web-view: only autosearch input without scheme
Comment 25 Xan Lopez 2012-02-07 13:11:26 UTC
*** Bug 669568 has been marked as a duplicate of this bug. ***