From 8a7d23de0a9b0f4912960c9a3b103f652db15241 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Tue, 3 Apr 2007 14:58:01 +0000 Subject: [PATCH] Check for forbidden attributes "Date" and "ID" SVN revision: 1827 --- src/elogd.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/elogd.c b/src/elogd.c index c3b2b56e..887a8cc9 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -17178,6 +17178,18 @@ void show_elog_list(LOGBOOK * lbs, int past_n, int last_n, int page_n, BOOL defa return; } + /* check for invalid attributes in config file */ + for (i = 0; i < MAX_N_ATTR; i++) { + if (strieq(attr_list[i], "Date")) { + show_error("Attribute name \"Date\" is not allowed in config file"); + return; + } + if (strieq(attr_list[i], "ID")) { + show_error("Attribute name \"Date\" is not allowed in config file"); + return; + } + } + slist = xmalloc((MAX_N_ATTR + 10) * NAME_LENGTH); svalue = xmalloc((MAX_N_ATTR + 10) * NAME_LENGTH); gattr = xmalloc(MAX_N_ATTR * NAME_LENGTH);