mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 10:43:47 +08: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
|
@ -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 New Issue
Block a user