0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-09 05:29:00 +02:00

ircd:Ⓜ️:event::conforms: Add missing origin conditions.

This commit is contained in:
Jason Volk 2020-03-25 11:53:47 -07:00
parent 35a18366b4
commit 629617deb9

View file

@ -249,8 +249,10 @@ ircd::m::event::conforms::conforms(const event &e)
if(empty(json::get<"origin"_>(e)))
set(MISSING_ORIGIN);
//TODO: XXX
if((false))
if(json::get<"origin"_>(e).size() > event::ORIGIN_MAX_SIZE)
set(INVALID_ORIGIN);
if(!rfc3986::valid_remote(std::nothrow, json::get<"origin"_>(e)))
set(INVALID_ORIGIN);
if(empty(json::get<"signatures"_>(e)))