fix: default to NTLM v2 in the network service for POSIX platforms (#23846)

* fix: default to NTLM v2 in the network service

* chore: update patch details
This commit is contained in:
Robo 2020-06-02 12:58:00 -07:00 committed by GitHub
parent c36981da8b
commit 512e1541c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 35 additions and 2 deletions

View file

@ -576,12 +576,14 @@ v8::Local<v8::Promise> Session::ClearAuthCache() {
}
void Session::AllowNTLMCredentialsForDomains(const std::string& domains) {
auto* command_line = base::CommandLine::ForCurrentProcess();
network::mojom::HttpAuthDynamicParamsPtr auth_dynamic_params =
network::mojom::HttpAuthDynamicParams::New();
auth_dynamic_params->server_allowlist = domains;
auth_dynamic_params->enable_negotiate_port =
base::CommandLine::ForCurrentProcess()->HasSwitch(
electron::switches::kEnableAuthNegotiatePort);
command_line->HasSwitch(electron::switches::kEnableAuthNegotiatePort);
auth_dynamic_params->ntlm_v2_enabled =
!command_line->HasSwitch(electron::switches::kDisableNTLMv2);
content::GetNetworkService()->ConfigureHttpAuthPrefs(
std::move(auth_dynamic_params));
}