← Back to team overview

mahara-contributors team mailing list archive

[Bug 634829] [NEW] maxuploadsize should consider that post_max_size is the whole POST content

 

Public bug reported:

In addition to respecting quota (), maxupload variable (which used to be
in filebrowser pieform, now it is in get_max_upload_size function, see
7b2772a03 on master) considers minimum value of either 'post_max_size'
or 'upload_max_filesize':

$maxuploadsize = min(get_real_size(ini_get('post_max_size')),
get_real_size(ini_get('upload_max_filesize')));

It should be taken into account that post_max_size PHP setting evaluates
the whole POST content (which includes file name and other from values,
not only the file itself), thus assuming that file should be equal to
this value while determining maxupload size is incorrect.

** Affects: mahara
     Importance: Medium
     Assignee: Ruslan Kabalin (ruslan-kabalin)
         Status: Fix Committed


** Tags: files

** Changed in: mahara
     Assignee: (unassigned) => Ruslan Kabalin (ruslan-kabalin)

** Changed in: mahara
   Importance: Low => Medium

-- 
maxuploadsize should consider that post_max_size is the whole POST content
https://bugs.launchpad.net/bugs/634829
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.

Status in Mahara ePortfolio: Fix Committed

Bug description:
In addition to respecting quota (), maxupload variable (which used to be in filebrowser pieform, now it is in get_max_upload_size function, see 7b2772a03 on master) considers minimum value of either 'post_max_size' or 'upload_max_filesize':

$maxuploadsize = min(get_real_size(ini_get('post_max_size')), get_real_size(ini_get('upload_max_filesize')));

It should be taken into account that post_max_size PHP setting evaluates the whole POST content (which includes file name and other from values, not only the file itself), thus assuming that file should be equal to this value while determining maxupload size is incorrect.





Follow ups

References