Skip to content

fix(security): scope connect modify() guest write (review follow-up to #126)#128

Merged
telivity-otaip merged 1 commit into
mainfrom
claude/fix-modify-guest-scope
Jun 20, 2026
Merged

fix(security): scope connect modify() guest write (review follow-up to #126)#128
telivity-otaip merged 1 commit into
mainfrom
claude/fix-modify-guest-scope

Conversation

@telivity-otaip

Copy link
Copy Markdown
Collaborator

Improvement-loop review (Claude + Codex) of #126/#127 found one incomplete fix: ConnectBookingService.modify() still overwrote the cross-property guests row by bare id, so a caller could rename a guest shared with another tenant (PII poison on legacy shared rows — the exact write-side vector #126's own comment flagged).

Now: if the guest is linked to any other property, fork a property-local copy and repoint this reservation; otherwise update in place. TDD (fork + no-over-fork tests). Full suite 1007/1007, typecheck clean.

🤖 Generated with Claude Code

… instead of overwriting

Review follow-up: findOrCreateGuest reuse was scoped to the property, but modify()
still updated the cross-property guests row by bare id, so a caller could rename a
guest shared with another tenant (PII poison on legacy shared rows). Now: if the
guest is linked to any OTHER property, fork a property-local copy and repoint this
reservation; otherwise update in place.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@telivity-otaip telivity-otaip merged commit 8910008 into main Jun 20, 2026
4 checks passed
telivity-otaip added a commit that referenced this pull request Jun 20, 2026
…il-open on bad config (#130)

Independent codex review of #126-#128 found two gaps:
- assertSafeChannelEndpoint only enforced for NODE_ENV=production, leaving staging
  open to SSRF even though this changeset hardened staging elsewhere. Now enforces
  for production OR staging (matches assertSecureConfig).
- SMS quota parsed env with Number() and disabled on NaN, so SMS_RATE_LIMIT_MAX=garbage
  silently turned the limiter off. Now an invalid value falls back to the default
  (limiter stays on); only an explicit valid value <= 0 disables it.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant