Skip to content

Commit 9570bd5

Browse files
committed
Remove usages of "whitelist" in Firestore.
Fixes #6755.
1 parent c264003 commit 9570bd5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Firestore/core/src/remote/datastore.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void LogGrpcCallFinished(absl::string_view rpc_name,
8383
if (LogIsDebugEnabled()) {
8484
auto headers =
8585
Datastore::GetWhitelistedHeadersAsString(call->GetResponseHeaders());
86-
LOG_DEBUG("RPC %s returned headers (whitelisted): %s", rpc_name, headers);
86+
LOG_DEBUG("RPC %s returned headers (allowlisted): %s", rpc_name, headers);
8787
}
8888
}
8989

@@ -334,13 +334,13 @@ bool Datastore::IsPermanentWriteError(const Status& error) {
334334

335335
std::string Datastore::GetWhitelistedHeadersAsString(
336336
const GrpcCall::Metadata& headers) {
337-
static std::unordered_set<std::string> whitelist = {
337+
static std::unordered_set<std::string> allowlist = {
338338
"date", "x-google-backends", "x-google-netmon-label", "x-google-service",
339339
"x-google-gfe-request-trace"};
340340

341341
std::string result;
342342
for (const auto& kv : headers) {
343-
if (whitelist.find(MakeString(kv.first)) != whitelist.end()) {
343+
if (allowlist.find(MakeString(kv.first)) != allowlist.end()) {
344344
absl::StrAppend(&result, MakeStringView(kv.first), ": ",
345345
MakeStringView(kv.second), "\n");
346346
}

Firestore/core/src/remote/stream.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ void Stream::OnStreamRead(const grpc::ByteBuffer& message) {
202202
HARD_ASSERT(IsStarted(), "OnStreamRead called for a stopped stream.");
203203

204204
if (LogIsDebugEnabled()) {
205-
LOG_DEBUG("%s headers (whitelisted): %s", GetDebugDescription(),
205+
LOG_DEBUG("%s headers (allowlisted): %s", GetDebugDescription(),
206206
Datastore::GetWhitelistedHeadersAsString(
207207
grpc_stream_->GetResponseHeaders()));
208208
}

Firestore/core/test/unit/remote/datastore_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ TEST_F(DatastoreTest, WhitelistedHeaders) {
180180
GrpcStream::Metadata headers = {
181181
{"date", "date value"},
182182
{"x-google-backends", "backend value"},
183-
{"x-google-foo", "should not be in result"}, // Not whitelisted
183+
{"x-google-foo", "should not be in result"}, // Not allowlisted
184184
{"x-google-gfe-request-trace", "request trace"},
185185
{"x-google-netmon-label", "netmon label"},
186186
{"x-google-service", "service 1"},

0 commit comments

Comments
 (0)