mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-03 04:44:48 -04:00
Validate device_keys for C-S /keys/query requests (#10593)
* Validate device_keys for C-S /keys/query requests Closes #10354 A small, not particularly critical fix. I'm interested in seeing if we can find a more systematic approach though. #8445 is the place for any discussion.
This commit is contained in:
parent
e81d62009e
commit
ee3b2ac59a
4 changed files with 101 additions and 1 deletions
|
@ -147,6 +147,14 @@ class SynapseError(CodeMessageException):
|
|||
return cs_error(self.msg, self.errcode)
|
||||
|
||||
|
||||
class InvalidAPICallError(SynapseError):
|
||||
"""You called an existing API endpoint, but fed that endpoint
|
||||
invalid or incomplete data."""
|
||||
|
||||
def __init__(self, msg: str):
|
||||
super().__init__(HTTPStatus.BAD_REQUEST, msg, Codes.BAD_JSON)
|
||||
|
||||
|
||||
class ProxiedRequestError(SynapseError):
|
||||
"""An error from a general matrix endpoint, eg. from a proxied Matrix API call.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue