summaryrefslogtreecommitdiff
path: root/classes/Config.php
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2025-04-08 08:55:44 +0300
committerAndrew Dolgov <fox@fakecake.org>2025-04-08 08:55:44 +0300
commit25d3ce4ee8f411a19c3a0e69ebb5c575c16243a8 (patch)
tree81175cf9f11cdf6bf87dfc78f5d1f430d92297a9 /classes/Config.php
parent58677fc791604bd891fb1ef4f4cc5e040ce8e39f (diff)
drop SESSION-specific stuff and move encrypt/decrypt helpers to a separate class; add a command line flag to generate encryption keys
Diffstat (limited to 'classes/Config.php')
-rw-r--r--classes/Config.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/classes/Config.php b/classes/Config.php
index c9acad93e..e906419dc 100644
--- a/classes/Config.php
+++ b/classes/Config.php
@@ -192,8 +192,8 @@ 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 stored session data using Sodium library (XChaCha20-Poly1305) - generate using bin2hex(sodium_crypto_aead_xchacha20poly1305_ietf_keygen()) */
- const SESSION_ENCRYPTION_KEY = "SESSION_ENCRYPTION_KEY";
+ /** optional key to transparently encrypt sensitive data (currently limited to sessions); key is a 32 byte hex string may be generated using update.php --gen-encryption-key */
+ const ENCRYPTION_KEY = "ENCRYPTION_KEY";
/** default values for all global configuration options */
private const _DEFAULTS = [
@@ -253,7 +253,7 @@ class Config {
Config::T_STRING ],
Config::HTTP_429_THROTTLE_INTERVAL => [ 3600, Config::T_INT ],
Config::DISABLE_LOGIN_FORM => [ "", Config::T_BOOL ],
- Config::SESSION_ENCRYPTION_KEY => [ "", Config::T_STRING ]
+ Config::ENCRYPTION_KEY => [ "", Config::T_STRING ]
];
private static ?Config $instance = null;