BUG: App name not validated server-side, only client-side HTML pattern #37
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/upaas#37
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: MEDIUM
File:
internal/handlers/app.golines 44-79 (HandleAppCreate, HandleAppUpdate)Description
The app name is used directly in:
"upaas-" + app.Name(deploy.go)"upaas-%s:%d"(deploy.go)pattern="[a-z0-9-]+"attribute is only client-side validationA crafted POST request bypassing the browser can submit names with spaces, special characters, path separators, etc., potentially causing:
Suggested Fix
Add server-side validation matching the client-side pattern:
Apply this in both
HandleAppCreateandHandleAppUpdate.yes. give me a PR