fix/trim-whitespace-inputs #9

Open
rssnyder wants to merge 3 commits from fix/trim-whitespace-inputs into main
Owner
No description provided.
Creation paths were storing/sending untrimmed input, inconsistent with
the edit paths that already trim:

- NewEventSheet: trim event description before insert + sync (matches
  EventDetailScreen.handleSaveDescription; whitespace-only now becomes null)
- RegisterScreen: trim username and email before registering
- LoginScreen: trim username before login

Passwords are intentionally left untrimmed (whitespace can be valid).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fix(backend): trim whitespace from text inputs server-side
All checks were successful
Backend CI / test (pull_request) Successful in 13s
Backend CI / build-push-web (pull_request) Successful in 18s
Backend CI / build-push-api (pull_request) Successful in 38s
4332413b94
Defense-in-depth to match the client fixes; the server is the source of
truth and must not rely on clients trimming. Adds shared helpers in
internal/api/helpers.go and applies them consistently:

- trimmedNullString: optional free-text (event description/location,
  bio) — whitespace-only now stored as NULL instead of blank junk
- trimmedNonBlank: required text (comment body, milestone rename,
  template name) — gin's `required` accepts whitespace-only strings, so
  these are now re-checked and rejected with 400
- trimTags / trimEach: event tags (drop blanks) and template milestone
  names (trim in place, blanks still fail validation)
- Login trims username before lookup

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Merge branch 'main' into fix/trim-whitespace-inputs
All checks were successful
Backend CI / test (pull_request) Successful in 12s
Backend CI / build-push-api (pull_request) Successful in 2m33s
Backend CI / build-push-web (pull_request) Successful in 20s
763984c24d
All checks were successful
Backend CI / test (pull_request) Successful in 12s
Backend CI / build-push-api (pull_request) Successful in 2m33s
Backend CI / build-push-web (pull_request) Successful in 20s
This pull request has changes conflicting with the target branch.
  • app/src/screens/event/NewEventSheet.tsx
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/trim-whitespace-inputs:fix/trim-whitespace-inputs
git switch fix/trim-whitespace-inputs
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rssnyder/span!9
No description provided.