Handle just POST requests in IncidentReporter

This commit is contained in:
Sajith Sasidharan 2020-04-14 16:10:20 -04:00
parent 497a832ad9
commit 15131a9f71

View File

@ -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")