fix(field): require caller ownership and cancel listings on combinePlots#179
Merged
fr1jo merged 5 commits intofrijo/release/PI-15from Feb 5, 2026
Merged
Conversation
- Add authorization check: caller must own the plots being combined - Cancel any existing pod listings before deleting combined plots - Remove permissionless access comment from natspec This prevents orphaned marketplace listings when plots are combined and ensures only the plot owner can trigger the combine operation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add vm.prank(farmers[0]) before combinePlots calls - Add test_combinePlotsUnauthorized to verify auth check Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Since caller must own the plots, derive account from LibTractor._user() instead of requiring it as a parameter. - Remove account parameter from combinePlots function signature - Update IMockFBeanstalk interface - Update tests to use new signature - Update error message to "Field: Plot not owned by caller" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
beany-bot
approved these changes
Feb 5, 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.
Summary
Context
During security review of PI-15, identified that
combinePlots()was permissionless and could leave orphaned marketplace listings:Changes
Test plan
combinePlotstests still pass🤖 Generated with Claude Code