Sam-max1 commited on
Commit
6cf6d2a
·
verified ·
1 Parent(s): 9266340

Deploy updated database and settings for nsedash

Browse files
nsedash/core/user_auth.py CHANGED
@@ -77,7 +77,9 @@ def init(base_dir: Path | str, hf_sync=None) -> None:
77
  _SECURITY_DIR = base_dir / "processed" / "security"
78
  _SECURITY_DIR.mkdir(parents=True, exist_ok=True)
79
  _USERS_DB_FILE = _SECURITY_DIR / "users.db"
80
- _ENCRYPTION_KEY_FILE = _SECURITY_DIR / ".encryption_key"
 
 
81
  _SESSION_TOKENS_FILE = _SECURITY_DIR / ".session_tokens.json"
82
  _HF_SYNC = hf_sync
83
  log.info("[Auth] Initialised security dir: %s (hf_sync linked: %s)", _SECURITY_DIR, hf_sync is not None)
 
77
  _SECURITY_DIR = base_dir / "processed" / "security"
78
  _SECURITY_DIR.mkdir(parents=True, exist_ok=True)
79
  _USERS_DB_FILE = _SECURITY_DIR / "users.db"
80
+ _ENCRYPTION_KEY_FILE = _SECURITY_DIR / "encryption_key.key"
81
+ if not _ENCRYPTION_KEY_FILE.exists() and (_SECURITY_DIR / ".encryption_key").exists():
82
+ _ENCRYPTION_KEY_FILE = _SECURITY_DIR / ".encryption_key"
83
  _SESSION_TOKENS_FILE = _SECURITY_DIR / ".session_tokens.json"
84
  _HF_SYNC = hf_sync
85
  log.info("[Auth] Initialised security dir: %s (hf_sync linked: %s)", _SECURITY_DIR, hf_sync is not None)
processed/security/.session_tokens.json CHANGED
@@ -2,6 +2,6 @@
2
  "GMd-4Xlnucnh9Jk8_iVcapFs3RJCZWRXFTjh8Ux6y1w": {
3
  "userid": "admin",
4
  "created_at": "2026-07-29T10:51:15.934245",
5
- "last_activity": "2026-07-29T11:28:06.016161"
6
  }
7
  }
 
2
  "GMd-4Xlnucnh9Jk8_iVcapFs3RJCZWRXFTjh8Ux6y1w": {
3
  "userid": "admin",
4
  "created_at": "2026-07-29T10:51:15.934245",
5
+ "last_activity": "2026-07-29T11:39:46.016474"
6
  }
7
  }
processed/security/encryption_key.key ADDED
@@ -0,0 +1 @@
 
 
1
+ 1mRnsO2QTLpbDUnUzh_9T9s0F2MyCrl9VIAdJqiMNOw=