Repository navigation
Stop task logs and contributor pages leaking to people who shouldn't see them - #558
Merged
Merged
Conversation
…see them (#539) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Oct 8, 2026
This was referenced Oct 9, 2026
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.
Addresses #539 (someone else's results visible on a contributor page). Review the rules below: this is a behaviour change on the server.
Problem
getTaskLogsandgetContributoronly checked that you were signed in. The filter came straight from the browser, so any signed-in user could ask for any task log (including form responses) in any project, and open any contributor page by changing the number in the URL. The app's intent is already visible in the UI: a contributor's contributors list is filtered down to themselves in the browser, after the server has sent everyone. The server never enforced it.Rules
getTaskLogsmetadata) are kept for project managers of the project, and for logs assigned to the user or to a team they are on. For everyone else's logs in the project the response is blanked (null). Status, approval, dates and who completed it are still returned, so summaries and counts (e.g. the milestone summary, which counts every assignee's logs) keep working.getContributor(now takesprojectId; its one caller,useContributorData, passes it)Not covered
Other queries have the same pattern of trusting the browser's filter (e.g.
getComments,getProjectMember,getTasks). This only covers task logs and the contributor lookup; I'd treat the rest as a follow-up audit.Testing
13 new tests with the database mocked: the filter is narrowed (and applies to the count and to paged results), managers keep responses, others' responses are blanked while own and team responses are kept, outsiders get nothing, and each contributor-lookup case above. 8 of them fail against the old code. Typecheck (apart from the existing
getJsonSchema.test.tserrors), lint and the full suite pass. Not yet checked in the app: please try as a project manager and as a contributor: the contributor page, a team page, the milestone summary and the dashboard widgets.🤖 Generated with Claude Code