修复cve fix中的任务创建的任务描述长度限制
This commit is contained in:
parent
fe51489d65
commit
0762b01dc2
62
0001-fix-param-limit-of-length.patch
Normal file
62
0001-fix-param-limit-of-length.patch
Normal file
@ -0,0 +1,62 @@
|
||||
From d722fa585045a52f3fbea7a2548e7ac5248f7845 Mon Sep 17 00:00:00 2001
|
||||
From: gongzt <gong_zhengtang@163.com>
|
||||
Date: Sat, 26 Nov 2022 19:04:50 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dcve=20fix=E4=B8=AD=E7=9A=84?=
|
||||
=?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=88=9B=E5=BB=BA=E7=9A=84=E4=BB=BB=E5=8A=A1?=
|
||||
=?UTF-8?q?=E6=8F=8F=E8=BF=B0=E9=95=BF=E5=BA=A6=E9=99=90=E5=88=B6?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
apollo/function/schema/repo.py | 8 ++++----
|
||||
apollo/function/schema/task.py | 4 ++--
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/apollo/function/schema/repo.py b/apollo/function/schema/repo.py
|
||||
index 14ad4ae..ea59f40 100644
|
||||
--- a/apollo/function/schema/repo.py
|
||||
+++ b/apollo/function/schema/repo.py
|
||||
@@ -24,9 +24,9 @@ class ImportYumRepoSchema(Schema):
|
||||
validators for parameter of /vulnerability/repo/import
|
||||
"""
|
||||
repo_name = fields.String(
|
||||
- required=True, validate=lambda s: 0 < len(s) < 20)
|
||||
+ required=True, validate=lambda s: 0 < len(s) <= 20)
|
||||
repo_data = fields.String(
|
||||
- required=True, validate=lambda s: 0 < len(s) < 512)
|
||||
+ required=True, validate=lambda s: 0 < len(s) <= 512)
|
||||
|
||||
|
||||
class GetYumRepoSchema(Schema):
|
||||
@@ -41,9 +41,9 @@ class UpdateYumRepoSchema(Schema):
|
||||
validators for parameter of /vulnerability/repo/update
|
||||
"""
|
||||
repo_name = fields.String(
|
||||
- required=True, validate=lambda s: 0 < len(s) < 20)
|
||||
+ required=True, validate=lambda s: 0 < len(s) <= 20)
|
||||
repo_data = fields.String(
|
||||
- required=True, validate=lambda s: 0 < len(s) < 512)
|
||||
+ required=True, validate=lambda s: 0 < len(s) <= 512)
|
||||
|
||||
|
||||
class DeleteYumRepoSchema(Schema):
|
||||
diff --git a/apollo/function/schema/task.py b/apollo/function/schema/task.py
|
||||
index 42ec6e8..b083dde 100644
|
||||
--- a/apollo/function/schema/task.py
|
||||
+++ b/apollo/function/schema/task.py
|
||||
@@ -80,9 +80,9 @@ class GenerateCveTaskSchema(Schema):
|
||||
validators for parameter of /vulnerability/task/cve/generate
|
||||
"""
|
||||
task_name = fields.String(required=True, validate=lambda s: len(s) != 0)
|
||||
- description = fields.String(required=True)
|
||||
+ description = fields.String(required=True, validate=lambda s: 0 < len(s) <= 50)
|
||||
auto_reboot = fields.Boolean(required=False, default=True)
|
||||
- check_items = fields.String(required=False)
|
||||
+ check_items = fields.String(required=False, validate=lambda s: 0 < len(s) <= 32)
|
||||
info = fields.List(fields.Nested(CveInfoDictSchema), required=True,
|
||||
validate=lambda s: len(s) > 0)
|
||||
|
||||
--
|
||||
Gitee
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
Name: aops-apollo
|
||||
Version: v1.1.0
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Cve management service, monitor machine vulnerabilities and provide fix functions.
|
||||
License: MulanPSL2
|
||||
URL: https://gitee.com/openeuler/%{name}
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Patch0001: 0001-fix-param-limit-of-length.patch
|
||||
|
||||
BuildRequires: python3-setuptools
|
||||
Requires: aops-vulcanus >= %{version}-%{release}
|
||||
@ -19,8 +20,7 @@ Cve management service, monitor machine vulnerabilities and provide fix function
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version}
|
||||
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
# build for aops-apollo
|
||||
%py3_build
|
||||
@ -40,6 +40,9 @@ Cve management service, monitor machine vulnerabilities and provide fix function
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Nov 26 2022 gongzhengtang<gong_zhengtang@163.com> - v1.1.0-2
|
||||
- Fix param limit of length
|
||||
|
||||
* Fri Nov 25 2022 wenxin<shusheng.wen@outlook.com> - v1.1.0-1
|
||||
- version update
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user