config: fix ruff E501 line length in POW_SECRET
Some checks failed
CI / Lint & Format (push) Failing after 28s
CI / Unit Tests (push) Has been skipped
CI / Memory Leak Check (push) Has been skipped
CI / Fuzz Testing (push) Has been skipped
CI / SBOM Generation (push) Has been skipped
CI / Security Scan (push) Successful in 33s
CI / Security Tests (push) Has been skipped
CI / Advanced Security Tests (push) Has been skipped
CI / Build & Push Image (push) Has been skipped
CI / Harbor Vulnerability Scan (push) Has been skipped

This commit is contained in:
Username
2026-02-23 21:37:26 +01:00
parent d638c822d3
commit fdf8364e80

View File

@@ -96,8 +96,10 @@ class Config:
# Secret key for signing challenges.
# When not set via env, a shared secret is persisted to data/.pow_secret
# so all gunicorn workers use the same HMAC key.
POW_SECRET = os.environ.get("FLASKPASTE_POW_SECRET", "") or _get_pow_secret(
Path(os.environ.get("FLASKPASTE_DB", Path(__file__).parent.parent / "data" / "pastes.db")).parent
_db_default = Path(__file__).parent.parent / "data" / "pastes.db"
_data_dir = Path(os.environ.get("FLASKPASTE_DB", _db_default)).parent
POW_SECRET = (
os.environ.get("FLASKPASTE_POW_SECRET", "") or _get_pow_secret(_data_dir)
)
# Registration PoW difficulty (higher than paste creation for security)
REGISTER_POW_DIFFICULTY = int(os.environ.get("FLASKPASTE_REGISTER_POW", "24"))