Remove histogram Net.Ntlm.HashDependsOnLocale
Enough data has been collected from the histogram Net.Ntlm.HashDependsOnLocale and it is set to expire. Remove it. BUG=1051924,1249094 Change-Id: I8d9a97acbc9d24e86f64ba7ccdcf8e2c9a374a5e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3158984 Commit-Queue: Adam Rice <ricea@chromium.org> Reviewed-by: Ryan Sleevi <rsleevi@chromium.org> Reviewed-by: Weilun Shi <sweilun@chromium.org> Cr-Commit-Position: refs/heads/main@{#929077}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
048c4fc873
commit
0e05fb1253
@ -8,9 +8,7 @@
|
|||||||
|
|
||||||
#include "base/check_op.h"
|
#include "base/check_op.h"
|
||||||
#include "base/containers/span.h"
|
#include "base/containers/span.h"
|
||||||
#include "base/metrics/histogram_macros.h"
|
|
||||||
#include "base/notreached.h"
|
#include "base/notreached.h"
|
||||||
#include "base/strings/string_util.h"
|
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "net/base/net_string_util.h"
|
#include "net/base/net_string_util.h"
|
||||||
#include "net/ntlm/ntlm_buffer_writer.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) {
|
base::span<uint8_t, kNtlmHashLen> v2_hash) {
|
||||||
// NOTE: According to [MS-NLMP] Section 3.3.2 only the username and not the
|
// NOTE: According to [MS-NLMP] Section 3.3.2 only the username and not the
|
||||||
// domain is uppercased.
|
// 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;
|
std::u16string upper_username;
|
||||||
bool result = ToUpper(username, &upper_username);
|
bool result = ToUpper(username, &upper_username);
|
||||||
DCHECK(result);
|
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];
|
uint8_t v1_hash[kNtlmHashLen];
|
||||||
GenerateNtlmHashV1(password, v1_hash);
|
GenerateNtlmHashV1(password, v1_hash);
|
||||||
NtlmBufferWriter input_writer((upper_username.length() + domain.length()) *
|
NtlmBufferWriter input_writer((upper_username.length() + domain.length()) *
|
||||||
|
@ -2377,6 +2377,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
|
|||||||
|
|
||||||
<histogram name="Net.Ntlm.HashDependsOnLocale" enum="Boolean"
|
<histogram name="Net.Ntlm.HashDependsOnLocale" enum="Boolean"
|
||||||
expires_after="2021-10-25">
|
expires_after="2021-10-25">
|
||||||
|
<obsolete>
|
||||||
|
Removed in 2021/09.
|
||||||
|
</obsolete>
|
||||||
<owner>eroman@chromium.org</owner>
|
<owner>eroman@chromium.org</owner>
|
||||||
<owner>src/net/OWNERS</owner>
|
<owner>src/net/OWNERS</owner>
|
||||||
<summary>
|
<summary>
|
||||||
|
Reference in New Issue
Block a user