summaryrefslogtreecommitdiff
path: root/admin.pl
diff options
context:
space:
mode:
Diffstat (limited to 'admin.pl')
-rwxr-xr-xadmin.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/admin.pl b/admin.pl
index c4ae2d48..9cf121f8 100755
--- a/admin.pl
+++ b/admin.pl
@@ -53,7 +53,12 @@ require "common.pl";
$| = 1;
-if ( $ENV{CONTENT_LENGTH} ) {
+if ( $ENV{CONTENT_LENGTH} > $LedgerSMB::Sysconfig::max_post_size ) {
+ print "Status: 413\n Request entity too large\n\n";
+ die "Error: Request entity too large\n";
+}
+
+if ( $ENV{CONTENT_LENGTH} > 0 ) {
read( STDIN, $_, $ENV{CONTENT_LENGTH} );
}