mirror of
https://github.com/matrix-construct/construct
synced 2024-11-10 20:11:07 +01:00
ircd:Ⓜ️ Throw better errcode for unverifiable sig; use 403 for failed verify.
This commit is contained in:
parent
839998e474
commit
7af4e85631
2 changed files with 3 additions and 2 deletions
|
@ -105,7 +105,7 @@ namespace ircd::m
|
|||
IRCD_M_EXCEPTION(error, BAD_REQUEST, http::BAD_REQUEST);
|
||||
IRCD_M_EXCEPTION(error, BAD_JSON, http::BAD_REQUEST);
|
||||
IRCD_M_EXCEPTION(error, NOT_JSON, http::BAD_REQUEST);
|
||||
IRCD_M_EXCEPTION(error, BAD_SIGNATURE, http::UNAUTHORIZED);
|
||||
IRCD_M_EXCEPTION(error, BAD_SIGNATURE, http::FORBIDDEN);
|
||||
IRCD_M_EXCEPTION(error, ACCESS_DENIED, http::FORBIDDEN);
|
||||
IRCD_M_EXCEPTION(error, FORBIDDEN, http::FORBIDDEN);
|
||||
IRCD_M_EXCEPTION(error, NOT_FOUND, http::NOT_FOUND);
|
||||
|
|
|
@ -476,8 +476,9 @@ catch(const ctx::interrupted &e)
|
|||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
throw m::BAD_SIGNATURE
|
||||
throw m::error
|
||||
{
|
||||
http::UNAUTHORIZED, "M_UNVERIFIABLE_SIGNATURE",
|
||||
"%s key %s for %s :%s",
|
||||
string_view{event.event_id},
|
||||
keyid,
|
||||
|
|
Loading…
Reference in a new issue