How to disable the "insecure password" warning in Firefox

Red Squirrel

No Lifer
May 24, 2003
67,436
12,164
126
www.anyf.ca
My dev server is not HTTPS as I don't want to keep having to deal with certificates for each sub domain etc (I have 1 subdomain per dev project, it's dynamically generated based on folders) and since it's local I just don't bother. However any time I'm entering forms I get the warning that it's not secure. Is there a way to disable that?

I followed this page: https://www.thewindowsclub.com/disable-insecure-password-login-prompt-firefox

But I don't see any option called security.insecure_password.ui.enabled only security.insecure_field_warning but I set it to false and it still does not work. Anything else I can try? Is there perhaps a way to add an IP exception or something? I just want to do the whole 10.x.x.x range.

I've gotten this to work before which is odd, but it just started doing it again a while back.
 

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,101
126
try security.insecure_field_warning.contextual.enabled. it's mentioned in the link (and its comments) you provided
 

Red Squirrel

No Lifer
May 24, 2003
67,436
12,164
126
www.anyf.ca
Yeah that's already on. (well, off I guess) That's originally how I disabled but but it seems to have stopped working. Wonder if an update changed something.
 

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,101
126
I couldn't find security.insecure_password.ui.enabled either. But found a security.insecure_field_warning.ignore_local_ip_address setting.

I don't use Firefox, you have to try yourself.
 

Red Squirrel

No Lifer
May 24, 2003
67,436
12,164
126
www.anyf.ca
It should be fairly recent, I just did an OS update today which should have updated Firefox too. I'm not at that computer right now but it's version 100 and something if I recall.
 

Red Squirrel

No Lifer
May 24, 2003
67,436
12,164
126
www.anyf.ca
Problem is this is local, there is no way to do the validation. Letsencrypt also does not do wildcard certs, at least I don't think.
 

Red Squirrel

No Lifer
May 24, 2003
67,436
12,164
126
www.anyf.ca
That's just replacing an error with another, and I don't know if I want to actually disable cert errors, as I want to see if I have errors on my production sites when I visit them by routine, and I don't really want to have to use multiple browsers.

There has got to be a way to just disable the form warning.
 

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,101
126
Don't know if you still have other options:

Found this article. TLTR

 

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,101
126
So I downloaded the whole Firefox code and checked it out to C:\mozilla-source\mozilla-unified following the instruction here.
But don't really know which one is the true Firefox repository on the internet.

I used Everything to search strings

Regarding security.insecure_field_warning.ignore_local_ip_address setting

C:\mozilla-source\mozilla-unified\toolkit\components\passwordmgr\InsecurePasswordUtils.jsm
javascript file handled insecure password conditions eventually should have called
isLocalIPv4 function in DNS.cpp file located at C:\mozilla-source\mozilla-unified\netwerk\dns

the code is

C++:
static bool isLocalIPv4(uint32_t networkEndianIP) {
  uint32_t addr32 = ntohl(networkEndianIP);
  return addr32 >> 24 == 0x0A ||    // 10/8 prefix (RFC 1918).
         addr32 >> 20 == 0xAC1 ||   // 172.16/12 prefix (RFC 1918).
         addr32 >> 16 == 0xC0A8 ||  // 192.168/16 prefix (RFC 1918).
         addr32 >> 16 == 0xA9FE;    // 169.254/16 prefix (Link Local).
}

so in theory it should work and shouldn't issue warning because the defaut value is true.

==

Found a site to search Firefox code.

 
Last edited:

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,101
126

JavaScript:
 isFormSecure(aForm) {
    let isSafePage = aForm.ownerDocument.defaultView.isSecureContext;

    // Ignore insecure documents with URLs that are local IP addresses.
    // This is done because the vast majority of routers and other devices
    // on the network do not use HTTPS, making this warning show up almost
    // constantly on local connections, which annoys users and hurts our cause.
    if (!isSafePage && this._ignoreLocalIPAddress) {
      let isLocalIP = this._isPrincipalForLocalIPAddress(
        aForm.rootElement.nodePrincipal
      );

      let topIsLocalIP =
        aForm.ownerDocument.defaultView.windowGlobalChild.windowContext
          .topWindowContext.isLocalIP;

      // Only consider the page safe if the top window has a local IP address
      // and, if this is an iframe, the iframe also has a local IP address.
      if (isLocalIP && topIsLocalIP) {
        isSafePage = true;
      }
    }

    let { isFormSubmitSecure, isFormSubmitHTTP } = this._checkFormSecurity(
      aForm
    );

    return isSafePage && (isFormSubmitSecure || !isFormSubmitHTTP);
  },
 

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,101
126
OK, so it does not include localhost which translate to 127.0.0.1
You should use a real LAN IP address.

C++:
static bool isLocalIPv4(uint32_t networkEndianIP) {
  uint32_t addr32 = ntohl(networkEndianIP);
  return addr32 >> 24 == 0x0A ||    // 10/8 prefix (RFC 1918).
         addr32 >> 20 == 0xAC1 ||   // 172.16/12 prefix (RFC 1918).
         addr32 >> 16 == 0xC0A8 ||  // 192.168/16 prefix (RFC 1918).
         addr32 >> 16 == 0xA9FE;    // 169.254/16 prefix (Link Local).
}
 

Red Squirrel

No Lifer
May 24, 2003
67,436
12,164
126
www.anyf.ca
The dev server is on a 10.x.x.x range, so it's odd it's not working if it should.

Maybe I'll just bite the bullet and look at setting up a local CA and do wild card certs for all my local domains. or at least the ones that have web servers. I think with a local CA you don't get the invalid certificate warnings. You need to import a cert file in the browser or something. Need to read up more on it.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |