config: only block words if they are in privacy* config keys

This commit is contained in:
missytake 2024-03-05 00:11:18 +01:00
parent ccd6e3e99c
commit e6a3fab6aa

View File

@ -426,8 +426,9 @@ def check_config(config):
mail_domain = config.mail_domain
if mail_domain != "testrun.org" and not mail_domain.endswith(".testrun.org"):
blocked_words = "merlinux schmieder testrun.org".split()
for value in config.__dict__.values():
if any(x in str(value) for x in blocked_words):
for key in config.__dict__:
value = config.__dict__[key]
if key.startswith("privacy") and any(x in str(value) for x in blocked_words):
raise ValueError(
f"please set your own privacy contacts/addresses in {config._inipath}"
)