fix: POST_MAX

This commit is contained in:
JT Smith 2006-06-07 16:10:43 +00:00
parent 4c39c6759b
commit f36879c55c
3 changed files with 3 additions and 2 deletions

View file

@ -7,6 +7,7 @@
- fix: Make Package not in Admin Bar
- fix: Survey Asset Copy Problems
- fix: EMS Add Subevent
- fix: POST_MAX
- fix: HTTPproxy
- fix: i18n reserved section name in Surveys
- fix: typo in Asset_ProjectManager i18n
@ -14,6 +15,7 @@
- fix: Pagination of search results does not work (Martin Kamerbeek / Procolix)
- fix: Workflow Commit with approval Error (Martin Kamerbeek / Procolix)
6.99.3
- Someone removed the status from the submission templates. That has been
fixed.

View file

@ -368,8 +368,6 @@ sub open {
my $config = WebGUI::Config->new($webguiRoot,$configFile);
my $self = {_config=>$config, _server=>$server};
bless $self , $class;
#$self->{_request} = Apache2::Request->new($request, POST_MAX => 1024 * $self->setting->get("maxAttachmentSize")) if (defined $request);
# something screwed about POST_MAX, must look at this later
$self->{_request} = Apache2::Request->new($request) if (defined $request);
my $sessionId = shift || $self->http->getCookies->{"wgSession"} || $self->id->generate;
my $noFuss = shift;

View file

@ -205,6 +205,7 @@ sub addFileFromFormPost {
my $tempFilename = $upload->filename();
next unless $tempFilename;
next unless $upload->size > 0;
next if ($upload->size > 1024 * $self->session->setting->get("maxAttachmentSize"));
if ($tempFilename =~ /([^\/\\]+)$/) { $tempFilename = $1; }
my $type = $self->getFileExtension($tempFilename);
if (isIn($type, qw(pl perl sh cgi php asp))) { # make us safe from malicious uploads