diff --git a/lib/common/signUtils.js b/lib/common/signUtils.js index b46dde79..275838a7 100644 --- a/lib/common/signUtils.js +++ b/lib/common/signUtils.js @@ -154,7 +154,7 @@ exports.getCanonicalRequest = function getCanonicalRequest(method, request, buck // Canonical Headers if (additionalHeaders) { additionalHeaders.forEach(v => { - if (!Object.hasOwn(headers, v)) { + if (!Object.prototype.hasOwnProperty.call(headers, v)) { throw Error(`Can't find additional header ${v} in request headers.`); } }); diff --git a/test/node/multiversion.test.js b/test/node/multiversion.test.js index 540425a1..1936bca4 100644 --- a/test/node/multiversion.test.js +++ b/test/node/multiversion.test.js @@ -23,7 +23,7 @@ describe('test/multiversion.test.js', () => { describe(`test multiversion in iterate ${idx}`, () => { before(async () => { store = oss({ ...config, ...moreConfigs }); - bucket = `ali-oss-test-bucket-multiversion-${prefix.replace(/[/.]/g, '-').slice(0, -1)}${idx}`; + bucket = `ali-oss-test-bucket-version-${prefix.replace(/[/.]/g, '-')}${idx}`; const result = await store.putBucket(bucket); store.useBucket(bucket);