You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this — it's a real gap (custom envs unlock things like Palworld TARGET_MANIFEST_ID pinning that the manager can't cover natively), and the implementation approach is right: injection at the buildContainerSpec choke point so every game gets it, a validated DTO (POSIX key names, value caps, max 64), configDirty → Restart prompt, and a UI card that matches the panel's patterns. The conditional UPDATE_ON_BOOT for TARGET_MANIFEST_ID is a nice touch. I'd like to merge this, with a few changes first:
1. Secrets exposure (blocker).extraEnv values are stored unencrypted and returned in ServerSummary, which every role — including viewers — can read. The headline use case makes this acute: locking a Palworld manifest requires STEAM_USERNAME/STEAM_PASSWORD alongside TARGET_MANIFEST_ID, so the feature funnels users into putting a Steam password into a plaintext, viewer-visible field — in a codebase where every other password is encrypted with SECRETS_KEY and never returned by the API. Minimum fix: don't return values to non-admin roles (mask them in the summary); ideally also encrypt extraEnvJson at rest the same way the password fields are. A note in the card ("values are visible to all panel users" — or not, once masked) would help too.
2. Rebase needed.main has moved since July 16 and now touches almost every file this PR does (dto.ts, servers.service.ts, runtime-spec.ts, page.tsx, schema.prisma, Dockerfile), so it needs a rebase before it can merge. Heads-up on two spots: the Overview card region in page.tsx gained a CrashBanner, and the Dockerfile runtime stage gained an npm strip near your sed line.
3. Tests. For a feature whose whole point is env injection, the suite should cover: the append-last/override ordering in buildContainerSpec, DTO validation (bad key names, oversized values rejected), and the TARGET_MANIFEST_ID → UPDATE_ON_BOOT conditional. There are existing patterns in runtime-spec.test.ts / version-pinning.test.ts to crib from.
4. create() drops extraEnv.CreateServerBody accepts it, but only update() persists it — creating a server with extraEnv silently loses them. Either persist it in create() too or drop it from the create DTO.
5. Optional, maintainer's caution: appending last means manager-owned keys (RCON_PORT, SERVER_PORT, ADMIN_PASSWORD, …) can be silently overridden and break the panel's own console/player-count/port plumbing. I'm fine keeping full override power for advanced users, but a short warning in the card naming those keys (or a tiny blocklist for the port/RCON ones) would save some support pain.
The .gitattributes/CRLF fixes are welcome — happy for those to stay in (or land separately if you prefer a tighter diff). Thanks again!
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
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.
No description provided.