Closed Bug 1334910 Opened 3 years ago Closed 3 years ago

Make SeaMonkey support moz://a

Categories

(SeaMonkey :: General, defect)

defect
Not set

Tracking

(seamonkey2.48 unaffected, seamonkey2.49esr fixed, seamonkey2.50 fixed, seamonkey2.51 fixed, seamonkey2.52 fixed)

VERIFIED FIXED
Tracking Status
seamonkey2.48 --- unaffected
seamonkey2.49esr --- fixed
seamonkey2.50 --- fixed
seamonkey2.51 --- fixed
seamonkey2.52 --- fixed

People

(Reporter: frg, Assigned: frg)

References

()

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1331968 +++

I'd imagine with the new logo, a lot of people will try typing moz://a in the URL bar.  It currently does a search for moz://a.
Setting the target to the SeaMonkey project homepage so that we are safe when it gets later set in m-c to something else like https://www.google.com/chrome/ :)
Attachment #8831542 - Flags: review?(iann_bugzilla)
Comment on attachment 8831542 [details] [diff] [review]
1334910-mozprotocol.patch

Review of attachment 8831542 [details] [diff] [review]:
-----------------------------------------------------------------

::: suite/browser/browser-prefs.js
@@ +1038,5 @@
>  #endif
>  #endif
> +
> +// Url shown when you type moz://a
> +pref("toolkit.mozprotocol.url", "http://www.seamonkey-project.org/");

I think we need to point to https://
Attachment #8831542 - Flags: feedback+
> I think we need to point to https://

Been there done that and gives a certificate error.
(In reply to Frank-Rainer Grahl from comment #0)
> +++ This bug was initially created as a clone of Bug #1331968 +++
> 
> I'd imagine with the new logo, a lot of people will try typing moz://a in
> the URL bar.  It currently does a search for moz://a.

UA:"Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0 SeaMonkey/2.51a1" 
ID:20170206003001 en-US 
c-c:41590e369c5c6cae8a892fd0238c456ecf9da69a 
m-c:20a8536b0bfac74389d3a57bd8dd957d98779ce1

On my version of SeaMonkey (as above) and with my settings it gives an error page (which I think is expected):

Unknown Protocol

One of the following (moz) is not a registered protocol or is not allowed in this context.
Yes. Without the patch depending on you settings a websearch will be initiated or an unknown protocol displayed. 

With the patch the standard website from moz:// or if the pref is set the website in the pref will be displayed.
(In reply to Tony Mechelynck [:tonymec]. (NEEDINFO me if you want my attention) from comment #4)
> On my version of SeaMonkey (as above) and with my settings it gives an error
> page (which I think is expected):
> 
> Unknown Protocol
> 
> One of the following (moz) is not a registered protocol or is not allowed in
> this context.

Correction: Typed in the URL bar, it does a search; right-clicked as this bug's URL link, followed by "Open Link in New Tab" it gives an error page; left-clicked in this bug it gives an alert:

This is considered an unsafe URL and could possibly be harmful. The full URL is:

moz://a

Continue?

                                           [ Cancel ] [[ OK ]]

(In reply to Frank-Rainer Grahl from comment #5)
> Yes. Without the patch depending on you settings a websearch will be
> initiated or an unknown protocol displayed. 
> 
> With the patch the standard website from moz:// or if the pref is set the
> website in the pref will be displayed.

Thanks for the info. Examining the patch show that the pref in question is toolkit.mozprotocol.url
Comment on attachment 8831542 [details] [diff] [review]
1334910-mozprotocol.patch

r/a=me
Attachment #8831542 - Flags: review?(iann_bugzilla) → review+
https://hg.mozilla.org/comm-central/rev/32c3c3a8274fdacce3e75b9f4aa790f0dfbf8cd4
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Comment on attachment 8831542 [details] [diff] [review]
1334910-mozprotocol.patch

[Approval Request Comment]
Regression caused by (bug #): none
User impact if declined: none just an unknown protocol error or a websearch will be shown 
Testing completed (on m-c, etc.): c-a c-b
Risk to taking this patch (and alternatives if risky): no risk but less fun without
String changes made by this patch: --
Attachment #8831542 - Flags: approval-comm-beta?
Attachment #8831542 - Flags: approval-comm-aurora?
UA:"Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0 SeaMonkey/2.51a1" 
ID:20170227003001 en-US 
c-c:abb720f671051534799f598a131ea7ac26a36987 
m-c:7ef1e9abd296a8edc39b7efc8d637767ba2f77ed

Testing the pref toolkit.mozprotocol.url
• When left at its default of http://www.seamonkey-project.org/ every moz://something (moz://a but also moz://b or moz://foobar) brings up http://www.seamonkey-project.org/
• When set to about: they all bring up jar:file:///usr/local/seamonkey/omni.ja!/chrome/comm/content/communicator/about.xhtml i.e. the about: page but without my userContent.css styles for it.

I suppose that this is the intended behaviour. Feel free to revert my VERIFIED status if it isn't.
Status: RESOLVED → VERIFIED
P.S. When set to about:addons, they bring up jar:file:///usr/local/seamonkey/omni.ja!/chrome/toolkit/content/mozapps/extensions/extensions.xul and any style rules from either userContent.css or my enabled extensions (there are several that affect that page's look&feel) are disregarded.
That seems to be how the protocol handler does it. There isn't one line of code in comm-central for this (aside from the installer include). Changes would be needed to be raised against Gecko but I would lay it at rest. Otherwise it might be fixed by just removing the pref :)
Comment on attachment 8831542 [details] [diff] [review]
1334910-mozprotocol.patch

a=me
Attachment #8831542 - Flags: approval-comm-beta?
Attachment #8831542 - Flags: approval-comm-beta+
Attachment #8831542 - Flags: approval-comm-aurora?
Attachment #8831542 - Flags: approval-comm-aurora+
Comment on attachment 8831542 [details] [diff] [review]
1334910-mozprotocol.patch

Trees have merged since asking for approval so c-r (and comm-esr52) approval now needed too.
Attachment #8831542 - Flags: approval-comm-release?
Attachment #8831542 - Flags: approval-comm-release? → approval-comm-release+
You need to log in before you can comment on or make changes to this bug.