mirror of
https://github.com/actions/add-to-project.git
synced 2025-12-14 05:57:15 +00:00
Fix regex for content type check in index.js
Addresses https://github.com/actions/add-to-project/security/code-scanning/8
This commit is contained in:
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
@@ -5068,7 +5068,7 @@ async function getResponseData(response) {
|
||||
if (/application\/json/.test(contentType)) {
|
||||
return response.json().catch(() => response.text()).catch(() => "");
|
||||
}
|
||||
if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
|
||||
if (!contentType || /^(text\/|charset=utf-8)$/.test(contentType)) {
|
||||
return response.text();
|
||||
}
|
||||
return getBufferResponse(response);
|
||||
|
||||
Reference in New Issue
Block a user