Repository navigation
fix(api): user update wiping profiles, unusable app names, silent endpoint loss, validate-compose gaps - #123
Merged
Merged
Conversation
…riting - POST /api/setup and POST /api/users reject empty/whitespace usernames - PUT /api/users/:id validates role, self-guard, email, password before any write; omitted display_name/email are kept, unchanged role no longer bumps token_version; unknown id returns 404
Deploy and bundle import now require ^[a-z0-9][a-z0-9_-]{0,62}$ (compose
rejects uppercase and dots in -p simpledeploy-<name>), with a readable
message. Existing-slug paths keep the looser rule so legacy apps stay
viewable and removable. Wizard and import modal show inline errors.
Such endpoints were silently dropped when labels were rewritten, leaving the app without its route. Return 400 naming the available services and leave the compose untouched.
The wizard's check only parsed the file, so it could report a valid compose that deploy then refused. It now applies the deploy rewrites, parses as a new app folder inside apps_dir and returns deploy's violation messages. Authorization unchanged (super_admin).
Deployer.Deploy is audited before the reconciler stores the compose version, so every normal deploy read "Deploy succeeded (version 0)". Omit version when unset; rollbacks keep theirs.
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.
Found by the E2E audit (tests were masking these with loose or conditional assertions).
requiredstopped it). Now 400; user create also rejects whitespace-only names..or uppercase passed validation butdocker compose -p simpledeploy-<name>rejects them, so every such deploy failed. New apps (deploy, import) must now match compose's project rule (^[a-z0-9][a-z0-9_-]{0,62}$, checked against compose-go's normalizer) with a plain-language message; existing apps with legacy names stay viewable and removable. Wizard and import modal show the rule inline.Docs: reference/api.md, security-hardening.md, apps-and-services.md, first-deploy, architecture/deployer.md.
Tests: Go tests for each (all failing before), vitests for slug/wizard/import modal. Full vitest (519) and affected Go packages pass.