Closed
Conversation
3ce3ed7 to
a4c23b5
Compare
EnesEfeTokta
approved these changes
Dec 13, 2025
tigran-sargsyan-w
left a comment
There was a problem hiding this comment.
Hey, thanks for putting this together — the idea of exposing lastCommandSender on NetworkBehaviour makes a lot of sense for handling urgent exploit scenarios without forcing a client rollout.
A few small thoughts while reading through the diff:
- Right now
lastCommandSenderis only set, never cleared. Do you see any risk of consumers accidentally using a stale value if they read it outside the current RPC handler? Might be worth either resetting it afterInvokeor documenting that it's only valid during the command call. - Since this becomes part of the surface area of
NetworkBehaviour, a short XML doc comment on the field / setter explaining the security use-case and lifetime would be super helpful for folks who just discover it via IDE tooltips. - Not sure if this is in scope for this PR, but having a tiny example in the docs that shows how to use
lastCommandSenderto validate a[Command(requiresAuthority = false)]would make the intent a lot clearer.
Overall the change itself is small and easy to reason about, and the trade‑off vs. forcing a client update is clear. Feels like it just needs a bit of extra guidance in docs/comments so people don’t accidentally misuse it.
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.
preview PR open for discussion.
adds life safer in case of exploits in production games.
basically: