diff --git a/ircd/rfc3986.cc b/ircd/rfc3986.cc index de48264bf..5ff4ac082 100644 --- a/ircd/rfc3986.cc +++ b/ircd/rfc3986.cc @@ -216,6 +216,14 @@ ircd::rfc3986::encode(const mutable_buffer &out, window_buffer buf{out}; const auto append{[&buf](const json::member &member) { + assert(type(member.first) == json::STRING); + if(unlikely(!member.second.serial && type(member.second) != json::STRING)) + throw assertive + { + "Cannot encode non-serial json::member type '%s'", + reflect(type(member.second)) + }; + consume(buf, size(encode(buf, member.first))); consume(buf, copy(buf, "="_sv)); consume(buf, size(encode(buf, member.second)));