From ddccd1e4c0aa87c60b08bf0517234788014c7996 Mon Sep 17 00:00:00 2001 From: Mardav Wala Date: Fri, 15 Aug 2025 11:02:53 -0400 Subject: [PATCH] Fix regex for content type check in index.js Addresses https://github.com/actions/add-to-project/security/code-scanning/8 --- dist/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 8b29262..df6fc73 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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); @@ -31286,4 +31286,4 @@ module.exports = parseParams /******/ /******/ })() ; -//# sourceMappingURL=index.js.map \ No newline at end of file +//# sourceMappingURL=index.js.map