Merge pull request #12968 from faztp12/oauth-multipart-form
fix: multipart/form-data breaks with OAuth tokens
This commit is contained in:
commit
2c7859d264
1 changed files with 3 additions and 1 deletions
|
|
@ -177,8 +177,10 @@ def validate_oauth(authorization_header):
|
|||
access_token = {"access_token": token}
|
||||
uri = parsed_url.scheme + "://" + parsed_url.netloc + parsed_url.path + "?" + urlencode(access_token)
|
||||
http_method = req.method
|
||||
body = req.get_data()
|
||||
headers = req.headers
|
||||
body = req.get_data()
|
||||
if req.content_type and "multipart/form-data" in req.content_type:
|
||||
body = None
|
||||
|
||||
try:
|
||||
required_scopes = frappe.db.get_value("OAuth Bearer Token", token, "scopes").split(get_url_delimiter())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue