You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use chatId from URL rather than from payload for chats (microsoft#700)
### Motivation and Context
The verify access to a chat, we use HandleRequest() with the chatId
provided. Currently, we get this from the payload, which can differ from
the chatId from the URL, which opens us to a security problem where a
user could inject an arbitrary chatId in the payload, which doesn't
match what's in the URL.
### Description
- Use chatId from URL and only from URL
- Add integrations test to validate this
### Contribution Checklist
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [Contribution
Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
0 commit comments