[Tickets #1947] NEW: Attachments limitations only work when between IMP's attach_size_limit and PHP's post_max_size

bugs@bugs.horde.org bugs at bugs.horde.org
Tue May 10 14:32:58 PDT 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=1947
-----------------------------------------------------------------------
 Ticket             | 1947
 Created By         | amy.rich at tufts.edu
 Summary            | Attachments limitations only work when between IMP's attach_size_limit and PHP's post_max_size
 Queue              | IMP
 Version            | 4.0.3
 State              | Unconfirmed
 Priority           | 2. Medium
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


amy.rich at tufts.edu (2005-05-10 14:32) wrote:

We have limited the IMP attachment size with
$conf['compose']['attach_size_limit'], and we've set a slightly larger size
limit in php's post_max_size.  When a user attempts to attach a file that's
between the two sizes, IMP produces the expected message saying that it can
not attach the file because it's too big.  If the user tries to attach a
file larger than post_max_size, though, php produces an error, but IMP does
not detect that the attachment size is too large and warn the user. 
Instead, the compose screen is wiped and returned to its virgin state.

I suspect that this happens because horde is using the superglobal arrays
$_POST and $_FILES to maintain email state.  See
http://www.php.net/manual/en/ini.core.php#ini.post-max-size

The only workaround from a configuration perspective is to make
post_max_size ludicrously large so that a user could never attempt to attach
a file that big.  Unfortunately, this means that other PHP applications can
also take advantage of that size limit.

Perferably imp/horde would warn the user and keep state any time the
attachment size exceeded attach_size_limit, not just when it's between
attach_size_limit and post_max_size.




More information about the bugs mailing list