Browse Source

[Web] add max_age limit for MTA-STS policy

FreddleSpl0it 2 weeks ago
parent
commit
8779d2f628
1 changed files with 2 additions and 2 deletions
  1. 2 2
      data/web/inc/functions.mailbox.inc.php

+ 2 - 2
data/web/inc/functions.mailbox.inc.php

@@ -1433,7 +1433,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
             );
             return false;
           }
-          if (empty($max_age) || $max_age < 0) {
+          if (empty($max_age) || $max_age < 0 || $max_age > 31536000) {
             $_SESSION['return'][] = array(
               'type' => 'danger',
               'log' => array(__FUNCTION__, $_action, $_type, $_data, $_attr),
@@ -3880,7 +3880,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
               );
               continue;
             }
-            if (empty($max_age) || $max_age < 0) {
+            if (empty($max_age) || $max_age < 0 || $max_age > 31557600) {
               $_SESSION['return'][] = array(
                 'type' => 'danger',
                 'log' => array(__FUNCTION__, $_action, $_type, $_data, $_attr),