On Thu, Oct 15, 2026 at 03:38:55PM +0100, Joe Orton wrote: > > Quick summay: Starting with apache 2.4.69, mod_cgid performs more > > sanity checks on inputs, including an abitrary limit of 256 entries > > in the envirnoment. > I'd rather bump it to something reasonably large and avoid another > config option. We could/should enforce that maximum on the sender side > as well which would give a better error path I geuss.
As far as I understand, there is no environment entry count limit elsewhere in Apache. The OS limits the total environement size to ARG_MAX bytes. and POSIX requires ARG_MAX to be at least _POSIX_ARG_MAX (4096). Apache defines APACHE_ARG_MAX as _POSIX_ARG_MAX if defined, or 512 otherwise. We could just use APACHE_ARG_MAX as the environment entry count limit: there cannot be more entries than there are bytes in the environment. That is huge, but still sane. -- Emmanuel Dreyfus [email protected]
