mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-19 20:57:08 +00:00
Fix overly permissive regular expression. (#21777)
This commit is contained in:
@@ -412,7 +412,7 @@ class ApiClient:
|
||||
data = json.loads(response_text)
|
||||
except ValueError:
|
||||
data = response_text
|
||||
elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE):
|
||||
elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE):
|
||||
if response_text == "":
|
||||
data = ""
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user