summaryrefslogtreecommitdiff
path: root/chromium/net/ntlm
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-02-02 12:21:57 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-02-12 08:13:00 +0000
commit606d85f2a5386472314d39923da28c70c60dc8e7 (patch)
treea8f4d7bf997f349f45605e6058259fba0630e4d7 /chromium/net/ntlm
parent5786336dda477d04fb98483dca1a5426eebde2d7 (diff)
downloadqtwebengine-chromium-606d85f2a5386472314d39923da28c70c60dc8e7.tar.gz
BASELINE: Update Chromium to 96.0.4664.181
Change-Id: I762cd1da89d73aa6313b4a753fe126c34833f046 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/net/ntlm')
-rw-r--r--chromium/net/ntlm/ntlm.cc16
-rw-r--r--chromium/net/ntlm/ntlm_buffer_writer.h6
-rw-r--r--chromium/net/ntlm/ntlm_client.h5
3 files changed, 12 insertions, 15 deletions
diff --git a/chromium/net/ntlm/ntlm.cc b/chromium/net/ntlm/ntlm.cc
index c35bdaecaa1..b0ce87db781 100644
--- a/chromium/net/ntlm/ntlm.cc
+++ b/chromium/net/ntlm/ntlm.cc
@@ -8,9 +8,7 @@
#include "base/check_op.h"
#include "base/containers/span.h"
-#include "base/metrics/histogram_macros.h"
#include "base/notreached.h"
-#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "net/base/net_string_util.h"
#include "net/ntlm/ntlm_buffer_writer.h"
@@ -294,19 +292,15 @@ void GenerateNtlmHashV2(const std::u16string& domain,
base::span<uint8_t, kNtlmHashLen> v2_hash) {
// NOTE: According to [MS-NLMP] Section 3.3.2 only the username and not the
// domain is uppercased.
+
+ // TODO(https://crbug.com/1051924): Using a locale-sensitive upper casing
+ // algorithm is problematic. A more predictable approach would be to only
+ // uppercase ASCII characters, so the hash does not change depending on the
+ // user's locale.
std::u16string upper_username;
bool result = ToUpper(username, &upper_username);
DCHECK(result);
- // TODO(https://crbug.com/1051924): Using a locale-sensitive upper casing
- // algorithm is problematic. A more predictable approach is to only uppercase
- // ASCII characters, so the hash does not change depending on the user's
- // locale. Histogram how often the locale-sensitive ToUpper() gives a result
- // that differs from ASCII uppercasing, to see how often this ambiguity arises
- // in practice.
- UMA_HISTOGRAM_BOOLEAN("Net.Ntlm.HashDependsOnLocale",
- upper_username != base::ToUpperASCII(username));
-
uint8_t v1_hash[kNtlmHashLen];
GenerateNtlmHashV1(password, v1_hash);
NtlmBufferWriter input_writer((upper_username.length() + domain.length()) *
diff --git a/chromium/net/ntlm/ntlm_buffer_writer.h b/chromium/net/ntlm/ntlm_buffer_writer.h
index f4535e63035..9818bb725f9 100644
--- a/chromium/net/ntlm/ntlm_buffer_writer.h
+++ b/chromium/net/ntlm/ntlm_buffer_writer.h
@@ -44,6 +44,10 @@ namespace ntlm {
class NET_EXPORT_PRIVATE NtlmBufferWriter {
public:
explicit NtlmBufferWriter(size_t buffer_len);
+
+ NtlmBufferWriter(const NtlmBufferWriter&) = delete;
+ NtlmBufferWriter& operator=(const NtlmBufferWriter&) = delete;
+
~NtlmBufferWriter();
size_t GetLength() const { return buffer_.size(); }
@@ -186,8 +190,6 @@ class NET_EXPORT_PRIVATE NtlmBufferWriter {
std::vector<uint8_t> buffer_;
size_t cursor_;
-
- DISALLOW_COPY_AND_ASSIGN(NtlmBufferWriter);
};
} // namespace ntlm
diff --git a/chromium/net/ntlm/ntlm_client.h b/chromium/net/ntlm/ntlm_client.h
index 27b00bbaed3..c295efd7053 100644
--- a/chromium/net/ntlm/ntlm_client.h
+++ b/chromium/net/ntlm/ntlm_client.h
@@ -42,6 +42,9 @@ class NET_EXPORT_PRIVATE NtlmClient {
// Integrity Check (MIC).
explicit NtlmClient(NtlmFeatures features);
+ NtlmClient(const NtlmClient&) = delete;
+ NtlmClient& operator=(const NtlmClient&) = delete;
+
~NtlmClient();
bool IsNtlmV2() const { return features_.enable_NTLMv2; }
@@ -150,8 +153,6 @@ class NET_EXPORT_PRIVATE NtlmClient {
const NtlmFeatures features_;
NegotiateFlags negotiate_flags_;
std::vector<uint8_t> negotiate_message_;
-
- DISALLOW_COPY_AND_ASSIGN(NtlmClient);
};
} // namespace ntlm