Merge pull request #16132 from rndmcnlly/feature/sqlcipher-database-encryption

feat: Implement SQLCipher support for database encryption
This commit is contained in:
Tim Jaeryang Baek
2025-08-09 23:55:03 +04:00
committed by GitHub
5 changed files with 103 additions and 25 deletions

View File

@@ -288,6 +288,9 @@ DB_VARS = {
if all(DB_VARS.values()):
DATABASE_URL = f"{DB_VARS['db_type']}://{DB_VARS['db_cred']}@{DB_VARS['db_host']}:{DB_VARS['db_port']}/{DB_VARS['db_name']}"
elif DATABASE_TYPE == "sqlite+sqlcipher" and not os.environ.get("DATABASE_URL"):
# Handle SQLCipher with local file when DATABASE_URL wasn't explicitly set
DATABASE_URL = f"sqlite+sqlcipher:///{DATA_DIR}/webui.db"
# Replace the postgres:// with postgresql://
if "postgres://" in DATABASE_URL: