Automatic proxy auth Topic is solved

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
Veit Kannegieser
Moongazer
Moongazer
Posts: 10
Joined: 2019-03-23, 19:16

Automatic proxy auth

Unread post by Veit Kannegieser » 2019-03-23, 19:44

Hello,

the company that i work for has changed the http proxy to protect the internet from its workers by windows passwords.

i managed to get the domain\user and the password pre filled for the authentication dialog.
Now i would like to avoid the dialog completely.

I found the relevant code in omi.jar, file components/nsLoginManagerPrompter.js, function promptAuth:

Code: Select all

      if (foundLogins.length > 0) {
        selectedLogin = foundLogins[0];
        this._SetAuthInfo(aAuthInfo, selectedLogin.username,
                                     selectedLogin.password);

        // Allow automatic proxy login
        if (aAuthInfo.flags & Ci.nsIAuthInformation.AUTH_PROXY &&
            !(aAuthInfo.flags & Ci.nsIAuthInformation.PREVIOUS_FAILED) &&
            Services.prefs.getBoolPref("signon.autologin.proxy") &&
            !this._inPrivateBrowsing) {

          this.log("Autologin enabled, skipping auth prompt.");
          canAutologin = true;
        }

        checkbox.value = true;
      }
...      
    var ok = canAutologin;
    if (!ok) {
      if (this._chromeWindow)
        PromptUtils.fireDialogEvent(this._chromeWindow, "DOMWillOpenModalDialog", this._browser);    
the AUTH_PROXY and not PREVIOUS_FAILED condition are true,
preference signon.autologin.proxy is also set,
but _inPrivateBrowsing lets the condition fail.


Could the file changed please, so automatic proxy authentication works also in "do not record chronic" mode?
For people that want to get the dialog, they can set the signon.autologin.proxy preference to false.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35631
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Automatic proxy auth

Unread post by Moonchild » 2019-03-23, 20:47

It doesn't work in private browsing mode because private browsing should never automatically use personal credentials (which makes your browsing "not private" for any local observer).
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Veit Kannegieser
Moongazer
Moongazer
Posts: 10
Joined: 2019-03-23, 19:16

Re: Automatic proxy auth

Unread post by Veit Kannegieser » 2019-03-28, 01:27

Good consideration.
I have tried a proxy extension, which worked fine, but then removed it again, changed profile settings, and works nice now.

Thanks.

Locked