fix(ansible): harden mysql data_disk path validation
Reject bare '/', path traversal ('..') and duplicated slashes ('//') in mysql_data_disk assertions to avoid deploying into unsafe directories.
This commit is contained in:
@@ -74,7 +74,10 @@
|
||||
- topology in ['standalone', 'primary_replica', 'mgr_3']
|
||||
- mysql_instance is match('^[a-z0-9][a-z0-9-]{0,62}$')
|
||||
- mysql_version_value in mysql_package_map
|
||||
- mysql_data_disk is match('^/')
|
||||
- mysql_data_disk is match('^/.+')
|
||||
- mysql_data_disk != '/'
|
||||
- "'..' not in mysql_data_disk"
|
||||
- "'//' not in mysql_data_disk"
|
||||
- (mysql_port_value | int) >= 13306
|
||||
- (mysql_port_value | int) <= 13999
|
||||
- (mysql_memory_mb_value | int) >= 2048
|
||||
|
||||
Reference in New Issue
Block a user