mirror of
https://github.com/github/codeql-action.git
synced 2026-10-21 02:01:27 +00:00
Check token value in uploadBundledDatabase
This commit is contained in:
5
lib/entry-points.js
generated
5
lib/entry-points.js
generated
@@ -178468,6 +178468,9 @@ async function uploadBundledDatabase(repositoryNwo, language, commitOid, bundled
|
||||
if (uploadsBaseUrl.endsWith("/")) {
|
||||
uploadsBaseUrl = uploadsBaseUrl.slice(0, -1);
|
||||
}
|
||||
const token = apiDetails.auth?.trim();
|
||||
const hasToken2 = token !== void 0 && token !== "";
|
||||
const authorization = hasToken2 ? `token ${token}` : void 0;
|
||||
const bundledDbReadStream = fs18.createReadStream(bundledDb);
|
||||
try {
|
||||
const startTime = performance.now();
|
||||
@@ -178482,7 +178485,7 @@ async function uploadBundledDatabase(repositoryNwo, language, commitOid, bundled
|
||||
commit_oid: commitOid,
|
||||
data: bundledDbReadStream,
|
||||
headers: {
|
||||
authorization: `token ${apiDetails.auth}`,
|
||||
authorization,
|
||||
"Content-Type": "application/zip",
|
||||
"Content-Length": bundledDbSize
|
||||
},
|
||||
|
||||
@@ -279,6 +279,10 @@ async function uploadBundledDatabase(
|
||||
uploadsBaseUrl = uploadsBaseUrl.slice(0, -1);
|
||||
}
|
||||
|
||||
const token = apiDetails.auth?.trim();
|
||||
const hasToken = token !== undefined && token !== "";
|
||||
const authorization = hasToken ? `token ${token}` : undefined;
|
||||
|
||||
const bundledDbReadStream = fs.createReadStream(bundledDb);
|
||||
try {
|
||||
const startTime = performance.now();
|
||||
@@ -293,7 +297,7 @@ async function uploadBundledDatabase(
|
||||
commit_oid: commitOid,
|
||||
data: bundledDbReadStream,
|
||||
headers: {
|
||||
authorization: `token ${apiDetails.auth}`,
|
||||
authorization,
|
||||
"Content-Type": "application/zip",
|
||||
"Content-Length": bundledDbSize,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user