We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d573777 commit 2acc449Copy full SHA for 2acc449
plugins/in_forward/fw_config.c
@@ -88,10 +88,21 @@ struct flb_in_fw_config *fw_config_init(struct flb_input_instance *i_ins)
88
/* Shared Key */
89
p = flb_input_get_property("shared_key", i_ins);
90
if (p) {
91
- config->shared_key = flb_sds_create(p);
+ if (strcmp(p, "\'\'") == 0 || strcmp(p, "\"\"") == 0) {
92
+ config->shared_key = flb_sds_create("");
93
+ }
94
+ else {
95
+ config->shared_key = flb_sds_create(p);
96
97
}
98
else {
- config->shared_key = NULL;
99
100
101
+ if (config->shared_key == NULL) {
102
+ flb_plg_error(i_ins, "could not initialize shared_key");
103
+ fw_config_destroy(config);
104
+
105
+ return NULL;
106
107
108
/* Self Hostname */
0 commit comments