summaryrefslogtreecommitdiff
path: root/trove/backup
diff options
context:
space:
mode:
authorwu.chunyang <wuchunyang@yovole.com>2022-09-06 21:03:25 +0800
committerwu.chunyang <wchy1001@gmail.com>2022-09-14 14:10:06 +0000
commit0ec4d0487bfd990697752133335b799f409e4418 (patch)
tree8d46b2e5dce244da36c6f94ea7c37e7956e2f1b2 /trove/backup
parentaf1db229b93e8ae408682f84fa72d38c6e827bec (diff)
downloadtrove-0ec4d0487bfd990697752133335b799f409e4418.tar.gz
Fix illegal shell characters18.0.0.0rc118.0.0
This change checks if the user input is legal. if illegal, we raise an InvalidValue excepiton. Story: 2010004 Task: 45128 Change-Id: Ib81646b8f8a01fcbc31d033ec205491b76a7b755
Diffstat (limited to 'trove/backup')
-rw-r--r--trove/backup/service.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/trove/backup/service.py b/trove/backup/service.py
index 8b3d9d0f..7e3d3fe9 100644
--- a/trove/backup/service.py
+++ b/trove/backup/service.py
@@ -88,6 +88,9 @@ class BackupController(wsgi.Controller):
swift_container = data.get('swift_container')
restore_from = data.get('restore_from')
+ if swift_container:
+ utils.validate_command(swift_container)
+
context.notification = notification.DBaaSBackupCreate(
context, request=req)