From 15131a9f71da04c448b9fc707556a77ce18f836d Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Tue, 14 Apr 2020 16:10:20 -0400 Subject: [PATCH] Handle just POST requests in IncidentReporter --- src/allmydata/web/root.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/allmydata/web/root.py b/src/allmydata/web/root.py index 95c80994e..06d02efbc 100644 --- a/src/allmydata/web/root.py +++ b/src/allmydata/web/root.py @@ -173,6 +173,9 @@ class IncidentReporter(MultiFormatResource): """Handler for /report_incident POST request""" def render(self, req): + if req.method != "POST": + raise WebError("/report_incident can only be used with POST") + log.msg(format="User reports incident through web page: %(details)s", details=get_arg(req, "details", ""), level=log.WEIRD, umid="LkD9Pw")