Slow performance has been affecting parsing headers in requests with
Content-Type: application/x-www-form-urlencoded header, when trying to parse the form submitted.
Having minimal application which parses form from request like this:
from flask import Flask, request
app = Flask(__name__)
@app.post("/submit")
def submit():
return {"username": request.form["username"]}
if __name__ == "__main__":
app.run()
making a request with specially crafted headers like this:
Slow performance has been affecting parsing headers in requests with
Content-Type: application/x-www-form-urlencoded
header, when trying to parse the form submitted.Having minimal application which parses form from request like this:
making a request with specially crafted headers like this:
would cause excessive load and making workers timeout.
The request should've been parsed without overloading the worker and extracted the form arguments as usual.
I'm planning to make a PR which should fix this issue.
Environment: