Check for forbidden attributes "Date" and "ID"

SVN revision: 1827
This commit is contained in:
2007-04-03 14:58:01 +00:00
parent dd07b4c969
commit 8a7d23de0a
+12
View File
@@ -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);