You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Root nodes in the tree are expected to be returned as a list. The Flask framework's implementation of json (jsonify) treats top-level lists as a security risk:
The problem are arrays at top-level in JSON. [...] An attacker can use this (like above) to get all the data you exported in your JSON file.
There is more information about a workaround in this issue:
I appreciate that top-level array elements are not allowed to be created in Flask's jsonify() implementation (http://flask.pocoo.org/docs/0.10/security/#json-security). Also, there are for sure straight-forward strategies for solving this in application code, for example by wrapping the list in a dictionary: jsonify({"items": collection}).
The text was updated successfully, but these errors were encountered:
Root nodes in the tree are expected to be returned as a list. The Flask framework's implementation of json (
jsonify
) treats top-level lists as a security risk:There is more information about a workaround in this issue:
The text was updated successfully, but these errors were encountered: