From 581a9638c6513cc0c2805b3e1cc5e08fde6dc650 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Thu, 5 May 2016 13:20:29 -0500 Subject: [PATCH] Add handling for colon in include_keys --- server/access.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/access.c b/server/access.c index 4ad4688e..6da10f8f 100644 --- a/server/access.c +++ b/server/access.c @@ -2324,6 +2324,7 @@ include_keys_file(acc_stanza_t *curr_acc, const char *access_filename, fko_srv_o char access_line_buf[MAX_LINE_LEN] = {0}; char var[MAX_LINE_LEN] = {0}; char val[MAX_LINE_LEN] = {0}; + char *ndx; printf("including key file %s\n", access_filename); if(stat(access_filename, &st) != 0) @@ -2364,6 +2365,11 @@ include_keys_file(acc_stanza_t *curr_acc, const char *access_filename, fko_srv_o return EXIT_FAILURE; } + /* Remove the colon if present + */ + if((ndx = strrchr(var, ':')) != NULL) + *ndx = '\0'; + if(CONF_VAR_IS(var, "KEY")) { if(strcasecmp(val, "__CHANGEME__") == 0)