From 3a41a86e94af466f615b00e256e9f52e00afa91f Mon Sep 17 00:00:00 2001 From: zhaixiaojian Date: Thu, 14 Nov 2024 23:29:10 +0800 Subject: [PATCH] * [bug#57101,done,0.1h,0h] Increase the number of retention days with integer verification. --- module/instance/control.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module/instance/control.php b/module/instance/control.php index a319f914c4..594c17c030 100644 --- a/module/instance/control.php +++ b/module/instance/control.php @@ -619,6 +619,9 @@ class instance extends control $instance = $this->instance->getByID($instanceID); if($_POST) { + $settings = fixer::input('post')->trim('backupKeepDays')->get(); + if(!validater::checkInt($settings->backupKeepDays, 1, 30)) return $this->send(array('result' => 'fail', 'message' => array('days' => $this->lang->instance->backup->keepDayRange))); + $this->instance->saveBackupSettings($instance); if(dao::isError()) return $this->send(array('result' => 'fail', 'load' => array('alert' => dao::getError())));