Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how can I get a list of foo: protocols that work in Firefox?

251 views
Skip to first unread message

Bennett Haselton

unread,
Apr 15, 2009, 7:24:37 PM4/15/09
to
I'm doing some messing around with security testing in Firefox and
part of that is knowing all the different types of weirdly formatted
URLs that Firefox might accept.

For example besides http:// and https:// , you can have URLs beginning
with jar: or file: or other even more obscure sequences. On the other
hand, if you type abc://www.yahoo.com/ into the Firefox address bar
you get "Firefox doesn't know how to open this address, because the
protocol (abc) isn't associated with any program."

Is there a master list of all the character sequences you can have at
the beginning of a Firefox URL in your address bar, before the ":",
that *won't* give you the "Firefox doesn't know how to open this
address" error?

Bennett

Fox on the run

unread,
Apr 15, 2009, 7:48:23 PM4/15/09
to
On Apr 15, 7:24 pm, Bennett Haselton <benn...@peacefire.org> wrote:
> I'm doing some messing around with security testing in Firefox and
> part of that is knowing all the different types of weirdly formatted
> URLs that Firefox might accept.
>
> For example besides http:// and https:// , you can have URLs beginning
> with jar: or file: or other even more obscure sequences.  On the other
> hand, if you type abc://www.yahoo.com/into the Firefox address bar

> you get "Firefox doesn't know how to open this address, because the
> protocol (abc) isn't associated with any program."
>
> Is there a master list of all the character sequences you can have at
> the beginning of a Firefox URL in your address bar, before the ":",
> that *won't* give you the "Firefox doesn't know how to open this
> address" error?
>
> Bennett

You can go to http://www.iana.org/assignments/uri-schemes.html and
view the registered URI schemes.and their associated RFCs. Not quite
what you are looking for, but at least it's a start as you have all
possible URI schemes.

JB

Melchert Fruitema

unread,
Apr 15, 2009, 7:58:43 PM4/15/09
to
On 16-04-2009 01:24 CET, Bennett Haselton composed this enchanting
statement:
Well, it can be anything associated with any program known by any internet browser.

Google, Wikipedia, etc.: search for 'external browser protocol'.

--
Kind regards,
Melchert

(MacOS 10.3.9 / Firefox 2.0, Thunderbird 2.0)

Ralph Fox

unread,
Apr 16, 2009, 6:03:32 AM4/16/09
to
On Wed, 15 Apr 2009 16:24:37 -0700 (PDT), in message news:97bdb6ed-79f9-4367...@d38g2000prn.googlegroups.com
Bennett Haselton wrote:

> X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT
> 5.1),gzip(gfe),gzip(gfe)

I will assume the question is about the Windows version of Firefox.
It would be useful if you told us which version of Firefox you were
asking about.

Protocols which won't give you an error fall into two categories

A. Protocols which Firefox handles internally

B. Protocols which Firefox will hand off to some other application.

For 'A'

Go to about:config, and look for all of the preferences named
network.protocol-handler.external.* which are set to false.

These are the protocols which Firefox will *not* try to hand off
to an external application. These can be further subdivided into
two categories
A.1 Those protocols which Firefox handles internally
A.2 Those protocols which Firefox does not handle, but which are
blocked for security reasons (for example, "vbscript").

I suggest you test these protocols one by one to find which ones
Firefox does handle internally.


For 'B'

There is no fixed list for this. It depends on which protocols
are registered with your operating system, and this varies from
computer to computer.

First, find a list of protocols which are registered with your
operating system and which have a handler. Then remove from this list
any protocols where Firefox has a preference
network.protocol-handler.external.* which is set to false.

In addition, in recent versions of Firefox for Windows you should
also go to "Tools » Options » Applications" and check any of the
"content type" values which are actually protocols (such as mailto).


For 'B' you can *not* use the list of preferences named
network.protocol-handler.external.* which are set to true.
Protocols may work when they are not listed, and protocols
listed may still not work.


--
Regards
Ralph

Bennett Haselton

unread,
Apr 16, 2009, 2:16:22 PM4/16/09
to
On Apr 16, 3:03 am, Ralph Fox <-rf-...@-.invalid> wrote:
> On Wed, 15 Apr 2009 16:24:37 -0700 (PDT), in messagenews:97bdb6ed-79f9-4367...@d38g2000prn.googlegroups.com

>
> Bennett Haselton wrote:
> > X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT
> > 5.1),gzip(gfe),gzip(gfe)
>
> I will assume the question is about the Windows version of Firefox.
> It would be useful if you told us which version of Firefox you were
> asking about.

Sorry, yes Windows.

> > I'm doing some messing around with security testing in Firefox and
> > part of that is knowing all the different types of weirdly formatted
> > URLs that Firefox might accept.
>
> > For example besides http:// and https:// , you can have URLs beginning
> > with jar: or file: or other even more obscure sequences. On the other

> > hand, if you type abc://www.yahoo.com/into the Firefox address bar


> > you get "Firefox doesn't know how to open this address, because the
> > protocol (abc) isn't associated with any program."
>
> > Is there a master list of all the character sequences you can have at
> > the beginning of a Firefox URL in your address bar, before the ":",
> > that *won't* give you the "Firefox doesn't know how to open this
> > address" error?
>
> Protocols which won't give you an error fall into two categories
>
> A. Protocols which Firefox handles internally
>
> B. Protocols which Firefox will hand off to some other application.
>
> For 'A'
>
> Go to about:config, and look for all of the preferences named
> network.protocol-handler.external.* which are set to false.
>
> These are the protocols which Firefox will *not* try to hand off
> to an external application. These can be further subdivided into
> two categories
> A.1 Those protocols which Firefox handles internally
> A.2 Those protocols which Firefox does not handle, but which are
> blocked for security reasons (for example, "vbscript").

Thanks! This gave me some that I had forgotten about like data: and
moz-icon:

But then there are some listed there that don't seem to work, for
example there's network.protocol-handler.external.afp and
network.protocol-handler.external.disk but afp:// and disk:// both
give "Firefox doesn't know how to open this address" etc. Is there
any way to get those to work as protocols in the address bar, or do
they correspond to something else?

> I suggest you test these protocols one by one to find which ones
> Firefox does handle internally.
>
> For 'B'
>
> There is no fixed list for this. It depends on which protocols
> are registered with your operating system, and this varies from
> computer to computer.
>
> First, find a list of protocols which are registered with your
> operating system and which have a handler.

This appears to be any sub-key under HKEY_CLASSES_ROOT that has a
string value named "URL Protocol", which seems to include most of the
protocols that I know about.

So this is helpful, thanks! But then there are some that Firefox
understands like "view-source:" and "about:" which are not listed in
the registry (no matches for the string "view-source" at all) or in
the network.protocol-handler.external.* list. Are those examples of
ones that are hard-coded into the source code, so the only way to find
them is to look in the source code?

Ralph Fox

unread,
Apr 17, 2009, 8:37:10 AM4/17/09
to

Those protocols that do not work, will be in category 'A.2'
in my previous message.

> Is there
> any way to get those to work as protocols in the address bar,

Some of these protocols are not meant to work in Firefox.

> or do
> they correspond to something else?

Firefox does not handle them, and they are blocked for security reasons.


>> I suggest you test these protocols one by one to find which ones
>> Firefox does handle internally.


In category 'A.2', the preference network.protocol-handler.external.*
is set to false specifically to prevent Firefox from passing these
protocols to an external application. Some external protocols are
considered a security risk, because they could allow a malicious web
page to do something like steal information or install viruses.
At your own risk, you could set network.protocol-handler.external.*
to true. I would suggest that you review why the protocol is
considered a security risk before you proceed with changing the
setting.

By way of example, read https://bugzilla.mozilla.org/show_bug.cgi?id=243699


>> For 'B'
>>
>> There is no fixed list for this. It depends on which protocols
>> are registered with your operating system, and this varies from
>> computer to computer.
>>
>> First, find a list of protocols which are registered with your
>> operating system and which have a handler.
>
> This appears to be any sub-key under HKEY_CLASSES_ROOT that has a
> string value named "URL Protocol", which seems to include most of the
> protocols that I know about.

Of course, if there is a string value named "URL Protocol" but
the key shell\open\command is not set to something valid, then
the protocol may still not work.

0 new messages