mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Do not allow slashes in server names
This commit is contained in:
parent
2a6c0ca751
commit
f28f689841
@ -23,6 +23,7 @@ new_server_schema = {
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"examples": ["My Server"],
|
"examples": ["My Server"],
|
||||||
"minLength": 2,
|
"minLength": 2,
|
||||||
|
"pattern": "^[^/\\\\]*$",
|
||||||
},
|
},
|
||||||
"roles": {"title": "Roles to add", "type": "array", "examples": [1, 2, 3]},
|
"roles": {"title": "Roles to add", "type": "array", "examples": [1, 2, 3]},
|
||||||
"stop_command": {
|
"stop_command": {
|
||||||
|
@ -12,7 +12,7 @@ logger = logging.getLogger(__name__)
|
|||||||
server_patch_schema = {
|
server_patch_schema = {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"server_name": {"type": "string", "minLength": 1},
|
"server_name": {"type": "string", "minLength": 2, "pattern": "^[^/\\\\]*$"},
|
||||||
"backup_path": {"type": "string"},
|
"backup_path": {"type": "string"},
|
||||||
"executable": {"type": "string"},
|
"executable": {"type": "string"},
|
||||||
"log_path": {"type": "string", "minLength": 1},
|
"log_path": {"type": "string", "minLength": 1},
|
||||||
|
Loading…
Reference in New Issue
Block a user