Files
ProxmoxVE-Local/.env.example
Macéo JALBERT 62bcfe0012 feat: add JWT expiry validation and refactor magic numbers (#612)
* feat: add JWT expiry validation and refactor magic numbers

- 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.

* refactor: remove unused and  confusing WEBSOCKET_PORT env variable

---------

Co-authored-by: Vivelis <¨maceo.jalbert@gmail.com¨>
2026-06-13 18:24:26 +02:00

40 lines
1.1 KiB
Plaintext

# When adding additional environment variables, the schema in "/src/env.js"
# should be updated accordingly.
# PocketBase - public API for script metadata (mirrors the community website)
PB_URL="https://db.community-scripts.org"
# Repository - used for downloading actual .sh script files
REPO_URL="https://github.com/community-scripts/ProxmoxVE"
REPO_BRANCH="main"
SCRIPTS_DIRECTORY="scripts"
ALLOWED_SCRIPT_EXTENSIONS=".sh"
# Security
MAX_SCRIPT_EXECUTION_TIME="900000"
ALLOWED_SCRIPT_PATHS="scripts/"
# User settings
# Optional tokens for private repos: GITHUB_TOKEN (GitHub), GITLAB_TOKEN (GitLab),
# BITBUCKET_APP_PASSWORD or BITBUCKET_TOKEN (Bitbucket). REPO_URL and added repos
# can be GitHub, GitLab, Bitbucket, or custom Git servers.
GITHUB_TOKEN=
GITLAB_TOKEN=
BITBUCKET_APP_PASSWORD=
SAVE_FILTER=false
FILTERS=
AUTH_USERNAME=
AUTH_PASSWORD_HASH=
AUTH_ENABLED=false
AUTH_SETUP_COMPLETED=false
JWT_SECRET=
DATABASE_URL="file:/opt/ProxmoxVE-Local/data/pve-scripts.db"
AUTO_SYNC_ENABLED=false
SYNC_INTERVAL_TYPE=
SYNC_INTERVAL_PREDEFINED=
AUTO_DOWNLOAD_NEW=
AUTO_UPDATE_EXISTING=
NOTIFICATION_ENABLED=
APPRISE_URLS=
LAST_AUTO_SYNC=
SYNC_INTERVAL_CRON=