Fix/password generation#615#617
Merged
MickLesk merged 3 commits intoJun 15, 2026
Merged
Conversation
added 2 commits
June 12, 2026 23:25
- Decode JWT in WebSocket auth to reject expired tokens and log auth failures. - Introduce constants `OUTPUT_BUFFER_MAX_LENGTH`, `BACKUP_UPDATE_DELAY_MS`, and `JWT_EXP_MS_FACTOR`. - Replace hardcoded buffer length and delay values with the new constants. - Coerce `AUTH_ENABLED` and `AUTH_SETUP_COMPLETED` to boolean and add `AUTH_SESSION_DURATION_DAYS` env.
…ls update Add a `syncProcessEnvFromFile()` function that reads the .env file and updates process.env and the cached JWT secret, ensuring that in-memory state matches the persisted environment without requiring a server restart. Call this function after writing credentials or toggling authentication settings to keep the running server in sync. Also set the setup completed flag when credentials are updated, and clear it when disabling auth to force the fresh setup flow on re-enable.
Vivelis
marked this pull request as ready for review
June 14, 2026 13:50
MickLesk
approved these changes
Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✍️ Description
This Pull request fixes the JWT_SECRET that was no longer saved properly inside the .env.
Auth environment variables are now handled using process.env.
New warn log was added in case the auth token is missing.
Tests has been conducted on the creation of a new LXC container instance.
🔗 Related PR / Issue
Fixes: #615
✅ Prerequisites (X in brackets)
🛠️ Type of Change (X in brackets)