Skip to content

Conversation

invictvs-k
Copy link
Owner

Summary

  • document the supported payload shapes handled by ResolveCommandTarget
  • clarify the intent for keeping command payload type checks localized to the helper

Testing

  • Not run (dotnet CLI not available in container)

https://chatgpt.com/codex/tasks/task_e_68f30ef788c0832e8b94ef5ab7c4dbd5

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +68 to +72
userId ??= entity.OwnerUserId;

_sessions.RemoveByConnection(Context.ConnectionId);

var normalized = NormalizeEntity(entity);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Badge Avoid trusting client owner_user_id as authenticated identity

The join handler assigns userId from the incoming payload when the caller is unauthenticated (userId ??= entity.OwnerUserId). Permission checks such as CanSendCommand and CanDirectMessage rely on session.UserId to enforce owner-only restrictions. A client can therefore join without authentication, set owner_user_id to an arbitrary value, and immediately send commands or DMs that are supposed to be limited to that owner. The user identifier must come from authenticated claims/headers (or after validating owner visibility), not from an untrusted request field.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant