diff --git a/radicale/auth/__init__.py b/radicale/auth/__init__.py index 89f65adc..08ec5ee0 100644 --- a/radicale/auth/__init__.py +++ b/radicale/auth/__init__.py @@ -32,6 +32,7 @@ Take a look at the class ``BaseAuth`` if you want to implement your own. from typing import Sequence, Tuple, Union from radicale import config, types, utils +from radicale.log import logger INTERNAL_TYPES: Sequence[str] = ("none", "remote_user", "http_x_remote_user", "denyall", @@ -40,6 +41,8 @@ INTERNAL_TYPES: Sequence[str] = ("none", "remote_user", "http_x_remote_user", def load(configuration: "config.Configuration") -> "BaseAuth": """Load the authentication module chosen in configuration.""" + if configuration.get("auth", "type") == "none": + logger.warn("No user authentication is selected (insecure)") return utils.load_plugin(INTERNAL_TYPES, "auth", "Auth", BaseAuth, configuration)