-CHANGES.txt - 2008-12-11
+CHANGES.txt - 2008-12-15
------------------------
CHANGES IN CUPS V1.4b2
- Documentation updates (STR #2983, STR #2998, STR #3021)
+ - The cupstestppd utility now validates the FileVersion and
+ FormatVersion values in PPD files.
- The default cupsd.conf file did not reflect the
--with-local-protocols value set at compile-time (STR #3037)
- The cupsGetPPD* APIs now create symlinks to local PPD files
}
}
- if (ppdFindAttr(ppd, "FileVersion", NULL) != NULL)
+ if ((attr = ppdFindAttr(ppd, "FileVersion", NULL)) != NULL)
{
- if (verbose > 0)
+ for (ptr = attr->value; *ptr; ptr ++)
+ if (!isdigit(*ptr & 255) && *ptr != '.')
+ break;
+
+ if (*ptr)
+ {
+ if (verbose >= 0)
+ {
+ if (!errors && !verbose)
+ _cupsLangPuts(stdout, _(" FAIL\n"));
+
+ _cupsLangPrintf(stdout,
+ _(" **FAIL** Bad FileVersion \"%s\"\n"
+ " REF: Page 56, section 5.3.\n"),
+ attr->value);
+ }
+
+ errors ++;
+ }
+ else if (verbose > 0)
_cupsLangPuts(stdout, _(" PASS FileVersion\n"));
}
else
errors ++;
}
- if (ppdFindAttr(ppd, "FormatVersion", NULL) != NULL)
+ if ((attr = ppdFindAttr(ppd, "FormatVersion", NULL)) != NULL)
{
- if (verbose > 0)
+ ptr = attr->value;
+ if (*ptr == '4' && ptr[1] == '.')
+ {
+
+ for (ptr += 2; *ptr; ptr ++)
+ if (!isdigit(*ptr & 255))
+ break;
+ }
+
+ if (*ptr)
+ {
+ if (verbose >= 0)
+ {
+ if (!errors && !verbose)
+ _cupsLangPuts(stdout, _(" FAIL\n"));
+
+ _cupsLangPrintf(stdout,
+ _(" **FAIL** Bad FormatVersion \"%s\"\n"
+ " REF: Page 56, section 5.3.\n"),
+ attr->value);
+ }
+
+ errors ++;
+ }
+ else if (verbose > 0)
_cupsLangPuts(stdout, _(" PASS FormatVersion\n"));
}
else