Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes igniterealtime#146: Limit URI template match for MUC affiliation
The fix for issue igniterealtime#141 introduces a template to replace four distinct URL patterns: - `/restapi/v1/chatrooms/{roomName}/owners` - `/restapi/v1/chatrooms/{roomName}/admins` - `/restapi/v1/chatrooms/{roomName}/members` - `/restapi/v1/chatrooms/{roomName}/outcasts` got replaced by - `/restapi/v1/chatrooms/{roomName}/{affiliation}` Sadly, this template matches more than just those four. URLs like these also get caught, making them misbehave: - `/restapi/v1/chatrooms/{roomName}/chathistory` - `/restapi/v1/chatrooms/{roomName}/occupants` - `/restapi/v1/chatrooms/{roomName}/participants` - `/restapi/v1/chatrooms/{roomName}/invite` This commit fixes the problem by applying a regular expression to the `{affiliation}` template, requiring it to match one of four distinct options.
- Loading branch information