aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/security/transport
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-01-12 13:41:52 -0800
committerGravatar Craig Tiller <ctiller@google.com>2017-01-12 13:41:52 -0800
commit95beab22843369189836828a0116a9760482ce7f (patch)
tree607151de481b16a18df4fdaaf83aaf74eb743f2b /src/core/lib/security/transport
parente5d8e02aa6efd3ce97f788560df3994473df8327 (diff)
Uncover the badness
Diffstat (limited to 'src/core/lib/security/transport')
-rw-r--r--src/core/lib/security/transport/client_auth_filter.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c
index cf7de49345..cf056e8008 100644
--- a/src/core/lib/security/transport/client_auth_filter.c
+++ b/src/core/lib/security/transport/client_auth_filter.c
@@ -123,24 +123,12 @@ static void on_credentials_metadata(grpc_exec_ctx *exec_ctx, void *user_data,
GPR_ASSERT(op->send_initial_metadata != NULL);
mdb = op->send_initial_metadata;
for (i = 0; i < num_md; i++) {
- if (!grpc_header_key_is_legal(md_elems[i].key)) {
- char *str = grpc_slice_to_c_string(md_elems[i].key);
- gpr_log(GPR_ERROR, "attempt to send invalid metadata key: %s", str);
- gpr_free(str);
- } else if (!grpc_is_binary_header(md_elems[i].key) &&
- !grpc_header_nonbin_value_is_legal(md_elems[i].value)) {
- char *str =
- grpc_dump_slice(md_elems[i].value, GPR_DUMP_HEX | GPR_DUMP_ASCII);
- gpr_log(GPR_ERROR, "attempt to send invalid metadata value: %s", str);
- gpr_free(str);
- } else {
- add_error(&error,
- grpc_metadata_batch_add_tail(
- exec_ctx, mdb, &calld->md_links[i],
- grpc_mdelem_from_slices(
- exec_ctx, grpc_slice_ref_internal(md_elems[i].key),
- grpc_slice_ref_internal(md_elems[i].value))));
- }
+ add_error(&error,
+ grpc_metadata_batch_add_tail(
+ exec_ctx, mdb, &calld->md_links[i],
+ grpc_mdelem_from_slices(
+ exec_ctx, grpc_slice_ref_internal(md_elems[i].key),
+ grpc_slice_ref_internal(md_elems[i].value))));
}
}
if (error == GRPC_ERROR_NONE) {