Closed olifre closed 2 months ago
Producing a warning is possible but documenting it is probably the best approach at this point since all of the MIME code will be gone in CUPS 3.0...
Marked #924 as a dupe of this; investigate increasing the limit (if possible) or updating the default PCL/PS detection rules to allow for outrageously long PJL headers from Windows clients.
[master 55e951340] Increase the mime.types limit to 8192 bytes and document it (Issue #925)
Many thanks, both for the bump and for documenting the new limit! :+1:
Describe the bug The manpage
mime.types.5
does not mention the limitation of the matching buffer, e.g. for thecontains
operation. Matching is currently limited to 4096. If higher lengths are used, matching seems to be silently limited to the first 4096 characters following the offset.To Reproduce Steps to reproduce the behavior:
mime.types
dropin usingcontains(0,8000,"LANGUAGE=PCL")
.cupsfilter
.Expected behavior An error should be shown, or the limitation should be documented (or both).
Additional context Limitation is hardcoded in the code here: https://github.com/OpenPrinting/cups/blob/9383b377eba6ddb5ed80ebb244907e9be6ccd169/scheduler/mime.h#L32 Of course a limit is very reasonable (#924 shows that is may be too small for nowadays print jobs in some cases to cover everything in a single match, though). It would be nice if this limit was documented or exceeding it would produce a warning (or both).