SF.net SVN: postfixadmin:[1736] trunk/model/MailboxHandler.php
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2015-01-12 17:12:14
|
Revision: 1736 http://sourceforge.net/p/postfixadmin/code/1736 Author: christian_boltz Date: 2015-01-12 17:12:07 +0000 (Mon, 12 Jan 2015) Log Message: ----------- MailboxHandler: - check_quota(): deny creating an unlimited mailbox if domain quota is set (reported by idaho7 in IRC) Modified Paths: -------------- trunk/model/MailboxHandler.php Modified: trunk/model/MailboxHandler.php =================================================================== --- trunk/model/MailboxHandler.php 2015-01-07 21:25:20 UTC (rev 1735) +++ trunk/model/MailboxHandler.php 2015-01-12 17:12:07 UTC (rev 1736) @@ -463,6 +463,8 @@ return true; # enforcing domain_quota is disabled - just allow it } elseif ($limit['quota'] <= 0) { # TODO: CHECK - 0 (unlimited) is fine, not sure about <= -1 (disabled)... $rval = true; + } elseif ($quota == 0) { # trying to create an unlimited mailbox, but domain quota is set + return false; } else { $table_mailbox = table_by_key('mailbox'); $query = "SELECT SUM(quota) FROM $table_mailbox WHERE domain = '" . escape_string($domain) . "'"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |