..mmh what I'd try too will be setting $CGI::POST_MAX even before CGI::Carp or even in a BEGIN block just after use CGI
you can also try to do the job on your own, like in A serious security problem with CGI.pm 3.01?:
BEGIN # run before anything { my $POST_MAX = -1; my $CL = defined($ENV{'CONTENT_LENGTH'}) ? $ENV{'CONTENT_LENGTH'} : +0; if(($POST_MAX > 0) and ($CL > $POST_MAX)) { print "Content-Type: text/plain\n", "Status: 413\n\n", "413 Request entity too large"; exit; } }
Infact this seems very simliar to what happens in the CGI.pm code:
You can insert temporarly some debug statements here in the module to dump what $content_length is at the moment.METHOD: { # avoid unreasonably large postings if (($POST_MAX > 0) && ($content_length > $POST_MAX)) { #discard the post, unread $self->cgi_error("413 Request entity too large"); last METHOD; }
See also Detecting when a $CGI::POST_MAX limit is exceeded and CGI.pm file upload freaking me out
L*
In reply to Re: CGI.pm POST_MAX not working
by Discipulus
in thread CGI.pm POST_MAX not working
by adjuvant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |