From 2574ea72a520686fcccfd57ce625708609667dc0 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 7 Feb 2019 23:40:13 -0800 Subject: [PATCH] modules/console: Fix path traverse regression. --- modules/console.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/console.cc b/modules/console.cc index 82ebd2334..2548a7bbf 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -9290,13 +9290,18 @@ console_cmd__fed__head(opt &out, const string_view &line) request.in.content }; + const json::object event + { + proto["event"] + }; + out << "DEPTH " - << proto.get({"event", "depth"}) + << event["depth"] << std::endl; const json::array &prev_events { - proto.get({"event", "prev_events"}) + event["prev_events"] }; for(const json::array &prev_event : prev_events) @@ -9314,7 +9319,7 @@ console_cmd__fed__head(opt &out, const string_view &line) const json::array &auth_events { - proto.get({"event", "auth_events"}) + event["auth_events"] }; for(const json::array &auth_event : auth_events)