mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
Issue #1275 - Add pref to disable warning prompts for SuperfluousAuth
and AutomaticAuth, and default to not prompting. This resolves #1275.
This commit is contained in:
parent
c7212a0d1a
commit
fe92ae641a
3 changed files with 21 additions and 3 deletions
|
|
@ -96,6 +96,7 @@ uint32_t nsHttpChannelAuthProvider::sAuthAllowPref =
|
|||
SUBRESOURCE_AUTH_DIALOG_ALLOW_ALL;
|
||||
|
||||
bool nsHttpChannelAuthProvider::sImgCrossOriginAuthAllowPref = false;
|
||||
bool nsHttpChannelAuthProvider::sConfirmAuthPref = false;
|
||||
|
||||
void
|
||||
nsHttpChannelAuthProvider::InitializePrefs()
|
||||
|
|
@ -107,6 +108,9 @@ nsHttpChannelAuthProvider::InitializePrefs()
|
|||
mozilla::Preferences::AddBoolVarCache(&sImgCrossOriginAuthAllowPref,
|
||||
"network.auth.subresource-http-img-XO-auth",
|
||||
false);
|
||||
mozilla::Preferences::AddBoolVarCache(&sConfirmAuthPref,
|
||||
"network.auth.confirmAuth.enabled",
|
||||
false);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
@ -1450,10 +1454,15 @@ nsHttpChannelAuthProvider::ConfirmAuth(const nsString &bundleKey,
|
|||
bool doYesNoPrompt)
|
||||
{
|
||||
// skip prompting the user if
|
||||
// 1) we've already prompted the user
|
||||
// 2) we're not a toplevel channel
|
||||
// 3) the userpass length is less than the "phishy" threshold
|
||||
// 1) prompts are disabled by preference
|
||||
// 2) we've already prompted the user
|
||||
// 3) we're not a toplevel channel
|
||||
// 4) the userpass length is less than the "phishy" threshold
|
||||
|
||||
if (!sConfirmAuthPref) {
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32_t loadFlags;
|
||||
nsresult rv = mAuthChannel->GetLoadFlags(&loadFlags);
|
||||
if (NS_FAILED(rv))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue