Skip to content

Commit 507fd35

Browse files
rojerChromium LUCI CQ
authored and
Chromium LUCI CQ
committed
RFC 7616 HTTP digest auth: Add support for SHA-256 and username hashing
Tested with lighttpd (configs: https://gist.github.com/rojer/f04fae5eeffe856ec4071a6c20873deb, password for user "test" is "test") Bug: 1160478 Change-Id: I0f5643663fe14b0676af7d2094f9e6d16bb7ff38 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4611879 Commit-Queue: Kenichi Ishibashi <[email protected]> Reviewed-by: David Benjamin <[email protected]> Cr-Commit-Position: refs/heads/main@{#1175895}
1 parent 57ef2d9 commit 507fd35

11 files changed

+318
-76
lines changed

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ Deepak Sharma <[email protected]>
326326
Deepak Singla <[email protected]>
327327
Deniz Eren Evrendilek <[email protected]>
328328
Deokjin Kim <[email protected]>
329+
Deomid rojer Ryabkov <[email protected]>
329330
Derek Halman <[email protected]>
330331
Devlin Cronin <[email protected]>
331332
Dhi Aurrahman <[email protected]>

chrome/browser/about_flags.cc

+5
Original file line numberDiff line numberDiff line change
@@ -10717,6 +10717,11 @@ const FeatureEntry kFeatureEntries[] = {
1071710717
password_manager::features::kFillingAcrossAffiliatedWebsitesAndroid)},
1071810718
#endif
1071910719

10720+
{"digest-auth-enable-secure-algorithms",
10721+
flag_descriptions::kDigestAuthEnableSecureAlgorithmsName,
10722+
flag_descriptions::kDigestAuthEnableSecureAlgorithmsDescription, kOsAll,
10723+
FEATURE_VALUE_TYPE(net::features::kDigestAuthEnableSecureAlgorithms)},
10724+
1072010725
// NOTE: Adding a new flag requires adding a corresponding entry to enum
1072110726
// "LoginCustomFlags" in tools/metrics/histograms/enums.xml. See "Flag
1072210727
// Histograms" in tools/metrics/histograms/README.md (run the

chrome/browser/flag-metadata.json

+5
Original file line numberDiff line numberDiff line change
@@ -1611,6 +1611,11 @@
16111611
],
16121612
"expiry_milestone": 130
16131613
},
1614+
{
1615+
"name": "digest-auth-enable-secure-algorithms",
1616+
"owners": [ "[email protected]" ],
1617+
"expiry_milestone": 120
1618+
},
16141619
{
16151620
"name": "disable-accelerated-2d-canvas",
16161621
"owners": [ "fserb" ],

chrome/browser/flag_descriptions.cc

+6
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ const char kDIPSDescription[] =
211211
"sites that appear to be performing cross-site tracking using the bounce "
212212
"tracking technique.";
213213

214+
const char kDigestAuthEnableSecureAlgorithmsName[] =
215+
"Enable Secure Algorithms for HTTP DIgest Auth";
216+
const char kDigestAuthEnableSecureAlgorithmsDescription[] =
217+
"This flag controls whether HTTP Digest auth handler should respond to "
218+
"challenges that use SHA-256. It also enables username hashing support.";
219+
214220
const char kDocumentPictureInPictureApiName[] =
215221
"Document Picture-in-Picture API";
216222
const char kDocumentPictureInPictureApiDescription[] =

chrome/browser/flag_descriptions.h

+3
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ extern const char kCustomizeChromeColorExtractionDescription[];
133133
extern const char kCustomizeChromeSidePanelName[];
134134
extern const char KCustomizeChromeSidePanelDescription[];
135135

136+
extern const char kDigestAuthEnableSecureAlgorithmsName[];
137+
extern const char kDigestAuthEnableSecureAlgorithmsDescription[];
138+
136139
extern const char kDIPSName[];
137140
extern const char kDIPSDescription[];
138141

net/base/features.cc

+4
Original file line numberDiff line numberDiff line change
@@ -419,4 +419,8 @@ BASE_FEATURE(kClearSiteDataWildcardSupport,
419419
"ClearSiteDataWildcardSupport",
420420
base::FEATURE_ENABLED_BY_DEFAULT);
421421

422+
BASE_FEATURE(kDigestAuthEnableSecureAlgorithms,
423+
"DigestAuthEnableSecureAlgorithms",
424+
base::FEATURE_ENABLED_BY_DEFAULT);
425+
422426
} // namespace net::features

net/base/features.h

+3
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,9 @@ NET_EXPORT BASE_DECLARE_FEATURE(kZstdContentEncoding);
422422
// targets as "*" rather than requiring all targets be listed out.
423423
NET_EXPORT BASE_DECLARE_FEATURE(kClearSiteDataWildcardSupport);
424424

425+
// Enables SHA-256 and username hashing support for HTTP Digest auth.
426+
NET_EXPORT BASE_DECLARE_FEATURE(kDigestAuthEnableSecureAlgorithms);
427+
425428
} // namespace net::features
426429

427430
#endif // NET_BASE_FEATURES_H_

0 commit comments

Comments
 (0)