Prevent popup in Firefox if username/password are in URL

2.3k views Asked by At

If you have a site protected with Basic authentication, you can automatically login if you add the username and password to the url

http://foo:bar@localhost

However, in Firefox, you will still get a popup

enter image description here

Is there a way in firefox to tell it not to show this dialog. For example, I can imagine that there is a setting inside the Profiles section to trust this site (which might solve this problem). Any help would be appreciated!

UPDATE: After a bit more searching I discovered that it might be possible with network.http.phishy-userpass-length, But when I check this in about:config I can't find it. So possibly this options has been removed

2

There are 2 answers

0
andrew_laser On

The possibility to use login credential in the URL has been deprecated in Firefox:

https://username:[email protected]/

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#access_using_credentials_in_the_url

0
chloesoe On

Just ran over that question and it helped me. So here the solution, if someone else has the same issue:

  1. open about:config in Firefox (confirm the message)
  2. right mouse on the list: New - Integer
  3. Set property name network.http.phishy-userpass-length
  4. Set Value to 255
  5. restart Firefox