mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 17:07:44 +00:00
webconfig: Error out on form-data
Just in case this happens anywhere return a sensible error instead of mishandling it.
This commit is contained in:
parent
cb3ee51e08
commit
17501bcc57
1 changed files with 4 additions and 0 deletions
|
@ -1328,6 +1328,10 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
|||
length = int(self.headers["content-length"])
|
||||
url_str = self.rfile.read(length).decode("utf-8")
|
||||
postvars = json.loads(url_str)
|
||||
elif ctype == "multipart/form-data":
|
||||
# This used to be a thing, as far as I could find there's
|
||||
# no use anymore, but let's keep an error around just in case.
|
||||
return self.send_error(500)
|
||||
else:
|
||||
postvars = {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue