Completed list of forbidden attributes

SVN revision: 2239
This commit is contained in:
Stefan Ritt 2009-07-27 08:47:58 +00:00
parent af3344aeaa
commit e7d165916a

View File

@ -7109,13 +7109,14 @@ int scan_attributes(char *logbook)
/* check for forbidden attributes */
for (i = 0; i < n; i++) {
if (strieq(attr_list[i], "text") ||
if (strieq(attr_list[i], "id") ||
strieq(attr_list[i], "text") ||
strieq(attr_list[i], "date") ||
strieq(attr_list[i], "encoding") ||
strieq(attr_list[i], "reply to") ||
strieq(attr_list[i], "locked by") ||
strieq(attr_list[i], "in reply to") || strieq(attr_list[i], "attachment")) {
sprintf(str, loc("Forbidden attribute: %s"), attr_list[i]);
sprintf(str, loc("Attribute \"%s\" is not allowed in config file"), attr_list[i]);
show_error(str);
return -1;
}
@ -19086,18 +19087,6 @@ 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);