diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2025-04-08 10:54:24 +0000 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2025-04-08 10:54:24 +0000 |
| commit | 008c518d5d8e60c0168cd107dbfd1f23f9c4a701 (patch) | |
| tree | 8f3d8afbbf73ae7d59791a3347a557c194f691d0 /classes/Config.php | |
| parent | bb2c4b380165731c3f8abf0596fffb2a0953265b (diff) | |
| parent | 17b4e98249462a1feb71586d10cd5293d9487ab8 (diff) | |
Merge branch 'session-encryption' into 'master'
add optional encryption for stored session data using Sodium library
See merge request tt-rss/tt-rss!117
Diffstat (limited to 'classes/Config.php')
| -rw-r--r-- | classes/Config.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/classes/Config.php b/classes/Config.php index 92037ff74..5098bfe68 100644 --- a/classes/Config.php +++ b/classes/Config.php @@ -6,7 +6,7 @@ class Config { const T_STRING = 2; const T_INT = 3; - const SCHEMA_VERSION = 147; + const SCHEMA_VERSION = 148; /** override default values, defined below in _DEFAULTS[], prefixing with _ENVVAR_PREFIX: * @@ -192,6 +192,10 @@ class Config { /** disables login form controls except HOOK_LOGINFORM_ADDITIONAL_BUTTONS (for SSO providers), also prevents logging in through auth_internal */ const DISABLE_LOGIN_FORM = "DISABLE_LOGIN_FORM"; + /** optional key to transparently encrypt sensitive data (currently limited to sessions and feed passwords), + * key is a 32 byte hex string which may be generated using `update.php --gen-encryption-key` */ + const ENCRYPTION_KEY = "ENCRYPTION_KEY"; + /** default values for all global configuration options */ private const _DEFAULTS = [ Config::DB_TYPE => [ "pgsql", Config::T_STRING ], @@ -249,7 +253,8 @@ class Config { Config::HTTP_USER_AGENT => [ 'Tiny Tiny RSS/%s (https://tt-rss.org/)', Config::T_STRING ], Config::HTTP_429_THROTTLE_INTERVAL => [ 3600, Config::T_INT ], - Config::DISABLE_LOGIN_FORM => [ "", Config::T_BOOL ] + Config::DISABLE_LOGIN_FORM => [ "", Config::T_BOOL ], + Config::ENCRYPTION_KEY => [ "", Config::T_STRING ] ]; private static ?Config $instance = null; |