Update getEvents and getResponses backend routes#212
Open
KrishivGubba wants to merge 4 commits intoschej-it:mainfrom
Open
Update getEvents and getResponses backend routes#212KrishivGubba wants to merge 4 commits intoschej-it:mainfrom
KrishivGubba wants to merge 4 commits intoschej-it:mainfrom
Conversation
jonyTF
requested changes
Jan 30, 2026
| localStorage[this.guestNameKey] = newName | ||
| // Also store with shortId or _id (to match eventId prop format used in Event.vue) | ||
| const eventIdKey = `${this.event.shortId ?? this.event._id}.guestName` | ||
| localStorage[eventIdKey] = newName |
Member
There was a problem hiding this comment.
what's the point of eventIdKey?
Member
There was a problem hiding this comment.
doesn't seem to be used anywhere, seems redundant with guestNameKey
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.
Summary
Closes #199
Fixes a privacy bug where
GET /api/events/{eventId}andGET /api/events/{eventId}/responsesreturned all responses with full user details despiteblindAvailabilityEnabledbeing set.Solution
Implemented server-side filtering for both endpoints:
getEventEndpointblindAvailabilityEnabledis false OR user is the ownerownerId,numResponses, and filters responses to only include the requester's responseguestNamequery parametergetResponsesEndpointblindAvailabilityEnabledis false OR user is the owneruserIdorguestName)Other Changes
updateEventResponseto prevent non-owners from setting guest availability whenblindAvailabilityEnabledis truesetSlotsplugin API method to reject guest name parameters for non-owners on events withblindAvailabilityEnabledguestNamequery parameter to both endpoints for proper filteringLimitations
One caveat: for private events, a non-owner could technically spoof a guest's availability by guessing a guest name and sending it as a query param. The only real fix would be session-based auth for guests, which feels like overkill since the data isn't very sensitive and guessing guest names isn't trivial.