From 3c7c71e10c31ea61b43cf53d5eac475d3267923a Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 3 Mar 2018 16:26:27 -0800 Subject: [PATCH] Fix support for forms that use form-data encoding https://www.virtualmin.com/node/55729 --- admin.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin.cgi b/admin.cgi index d0af41f..e0ac5fa 100755 --- a/admin.cgi +++ b/admin.cgi @@ -75,7 +75,7 @@ my $qs; &read_fully($STDIN, \$qs, $ENV{'CONTENT_LENGTH'}); print $TEMP $qs; close($TEMP); -if ($ENV{'REQUEST_METHOD'} eq 'POST') { +if ($ENV{'REQUEST_METHOD'} eq 'POST' && $ENV{'CONTENT_TYPE'} !~ /boundary=/) { $ENV{'CONTENT_TYPE'} = 'application/x-www-form-urlencoded'; }