Fix logistics network packet authorization#10468
Open
layue13 wants to merge 1 commit into
Open
Conversation
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.
Title
Fix locked logistics network packet authorization bypass
Summary
This PR moves locked logistics network permission checks to the real trust boundary: serverbound packet handling.
Previously, several logistics UIs checked
mayInteractbefore opening, but their server-side packet handlers applied changes without revalidating network permissions. A non-owner near the block could forge packets to place package orders, edit requester settings, change stock ticker categories, query stock summaries, or mutate factory panel connections.Changes
mayInteractchecks to logistics packet handlers before any expensive lookup, stock summary, network response, or block entity mutation.Risk
Low risk for unlocked or unowned logistics networks because existing
mayInteractsemantics still allow those interactions.Locked networks become stricter only for forged, stale, or unauthorized packets, which is the intended behavior.