Update ConfigFiles to use the correct name regex in web UI

This commit is contained in:
Théophile Diot 2023-10-20 11:25:44 +02:00
parent b265cbad54
commit ca6938dfe4
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06

View file

@ -28,7 +28,7 @@ def generate_custom_configs(
class ConfigFiles:
def __init__(self, logger, db):
self.__name_regex = re_compile(r"^[\w.-]{1,64}$")
self.__name_regex = re_compile(r"^[\w.-]{4,64}$")
self.__root_dirs = [child["name"] for child in path_to_dict(join(sep, "etc", "bunkerweb", "configs"))["children"]]
self.__file_creation_blacklist = ["http", "stream"]
self.__logger = logger