Seeking addon: Default HTTPS from address bar?

Talk about internet security, computer security, personal security, your social security number...
Post Reply
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Seeking addon: Default HTTPS from address bar?

Post by Thrawn »

Hi, all.

If you type a domain name in the address bar, Firefox will add http:// for you. If you want HTTPS, you have to type it in full.
Has anyone heard of an addon that could reverse this behavior, so https:// gets added unless you specify HTTP?

It wouldn't be for everyone, of course, but it could be a really simple way to get most of the benefits of HTTPS Everywhere, HTTPS Finder, HSTS preloading, etc, without breaking sites or spending bandwidth on probing them.

I'd imagine it wouldn't be too complicated to build.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0
Hecuba's daughter
Senior Member
Posts: 93
Joined: Mon Oct 01, 2012 6:34 am

Re: Seeking addon: Default HTTPS from address bar?

Post by Hecuba's daughter »

nvm
Last edited by Hecuba's daughter on Tue Jun 17, 2014 12:59 pm, edited 1 time in total.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0
barbaz
Senior Member
Posts: 11093
Joined: Sat Aug 03, 2013 5:45 pm

Re: Seeking addon: Default HTTPS from address bar?

Post by barbaz »

You might be able to make such an extension by modifying URL Fixer to look for typed scheme, and if there isn't one, prepend "https://" to the typed URL?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23
Hecuba's daughter
Senior Member
Posts: 93
Joined: Mon Oct 01, 2012 6:34 am

Re: Seeking addon: Default HTTPS from address bar?

Post by Hecuba's daughter »

nvm
Last edited by Hecuba's daughter on Tue Jun 17, 2014 12:59 pm, edited 1 time in total.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Seeking addon: Default HTTPS from address bar?

Post by Thrawn »

barbaz wrote:You might be able to make such an extension by modifying URL Fixer to look for typed scheme, and if there isn't one, prepend "https://" to the typed URL?
I had high hopes for its out-of-the-box functionality, but unfortunately it only seems to read hostnames :(
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0
barbaz
Senior Member
Posts: 11093
Joined: Sat Aug 03, 2013 5:45 pm

Re: Seeking addon: Default HTTPS from address bar?

Post by barbaz »

Thrawn wrote:unfortunately it only seems to read hostnames :(
Nope ;)
It actually reads everything, strips down the typed URL to a hostname, does its thing, then pieces the URL back together. It should be possible to make it mess with protocols instead.
(If the latest URL Fixer doesn't work like that, take a look at version 4.0.1)
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Seeking addon: Default HTTPS from address bar?

Post by Thrawn »

Well, when I tried matching

Code: Select all

re:([^h].*)
replace with

Code: Select all

https://$1
it matched this site and changed the URL to http://https://forums.informaction.com

Yet www.example.com was correctly changed to https://www.example.com

And www.google.com.au becomes https://https://www.google.com.au

According to Wladimir, it's really only for hostnames :(
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0
barbaz
Senior Member
Posts: 11093
Joined: Sat Aug 03, 2013 5:45 pm

Re: Seeking addon: Default HTTPS from address bar?

Post by barbaz »

Oh... sorry about the misunderstanding.
I don't know any add-on that will do what you want OOB. But I thought that editing URL Fixer's XPI might achieve that.
If you decide to try, you'll mainly want to look at typoFixer.js (and of course there's a lot you'll be able to just delete).

Also, it seems version 3.1 and older *do* correct entire URLs: https://addons.mozilla.org/firefox/addo ... /versions/
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Seeking addon: Default HTTPS from address bar?

Post by Thrawn »

So close:
URL Suffix

The only significant problem is that it doesn't work for URLs starting with 'www'. Otherwise it seems to do the job quite well.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0
barbaz
Senior Member
Posts: 11093
Joined: Sat Aug 03, 2013 5:45 pm

Re: Seeking addon: Default HTTPS from address bar?

Post by barbaz »

That extension sounds similar to
about:config -> browser.fixup.alternate.prefix
But I don't know if that pref affects protocols...
Its default value is 'www.', maybe that's why URL Suffix isn't fully achieving what you want?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23
Post Reply