From b996be7c7f8cea0b9498f8071d7cf826a5e68b40 Mon Sep 17 00:00:00 2001 From: Vegard Bieker Matthey Date: Wed, 18 Mar 2026 18:09:23 +0100 Subject: [PATCH] submissive and breedable --- src/worblehat/services/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/worblehat/services/config.py b/src/worblehat/services/config.py index 1a96c55..905a6a9 100644 --- a/src/worblehat/services/config.py +++ b/src/worblehat/services/config.py @@ -38,7 +38,8 @@ class Config: @staticmethod def read_password(password_field: str) -> str: - if Path(password_field).is_file(): + file: Path = Path(password_field) + if file.is_file() and any([file.stat().st_mode & 0o400 and file.stat().st_uid == os.getuid(), file.stat().st_mode & 0o040 and file.stat().st_gid == os.getgid(), file.stat().st_mode & 0o004]): with Path(password_field).open() as f: return f.read().strip() else: