From 686431d8721680327a3d52cb92f13451c38a83b3 Mon Sep 17 00:00:00 2001 From: AkhtarAmir Date: Mon, 2 Sep 2024 19:10:33 +0500 Subject: [PATCH 1/4] new branch route53 bugfix --- plugins/aws/eks/eksKubernetesVersion.spec.js | 2 +- plugins/aws/route53/domainTransferLock.js | 29 +++++++++++++++++-- .../aws/route53/domainTransferLock.spec.js | 2 +- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/plugins/aws/eks/eksKubernetesVersion.spec.js b/plugins/aws/eks/eksKubernetesVersion.spec.js index b53206f8d2..0997f85358 100644 --- a/plugins/aws/eks/eksKubernetesVersion.spec.js +++ b/plugins/aws/eks/eksKubernetesVersion.spec.js @@ -82,7 +82,7 @@ describe('eksKubernetesVersion', function () { "cluster": { "name": "mycluster", "arn": "arn:aws:eks:us-east-1:012345678911:cluster/mycluster", - "version": "1.27", + "version": "1.29", } } ); diff --git a/plugins/aws/route53/domainTransferLock.js b/plugins/aws/route53/domainTransferLock.js index 10c0e41422..f73b060eae 100644 --- a/plugins/aws/route53/domainTransferLock.js +++ b/plugins/aws/route53/domainTransferLock.js @@ -38,8 +38,33 @@ module.exports = { var domain = listDomains.data[i]; if (!domain.DomainName) continue; - // Skip .uk and .co.uk domains - if (domain.DomainName.indexOf('.uk') > -1) { + var dtlUnsupportedRegions = [ + '.za', + '.cl', + '.ar', + '.au', + '.nz', + '.au', + '.jp', + '.qa', + '.ru', + '.ch', + '.de', + '.es', + '.eu', + 'fi', + '.it', + '.nl', + '.se', + ]; + var unsupported = false; + dtlUnsupportedRegions.forEach((region) => { + if (domain.DomainName.includes(region)) { + unsupported = true; + } + }); + // Skip the unsupported domains + if (unsupported) { helpers.addResult(results, 0, 'Domain: ' + domain.DomainName + ' does not support transfer locks', 'global', domain.DomainName); diff --git a/plugins/aws/route53/domainTransferLock.spec.js b/plugins/aws/route53/domainTransferLock.spec.js index 889aee3be5..f0c388560a 100644 --- a/plugins/aws/route53/domainTransferLock.spec.js +++ b/plugins/aws/route53/domainTransferLock.spec.js @@ -15,7 +15,7 @@ const domains = [ "Expiry": 1602712345.0 }, { - "DomainName": "example.com.uk", + "DomainName": "example.com.jp", "AutoRenew": true, "TransferLock": true, "Expiry": 1602712345.0 From 75531bf9bc6a3df884609e34169ac01f845f055e Mon Sep 17 00:00:00 2001 From: AkhtarAmir Date: Wed, 4 Sep 2024 19:29:45 +0500 Subject: [PATCH 2/4] redoing route53 dtl changes for bug fix --- plugins/aws/route53/domainTransferLock.js | 44 +++++++++++------------ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/plugins/aws/route53/domainTransferLock.js b/plugins/aws/route53/domainTransferLock.js index f73b060eae..64c4b6ab33 100644 --- a/plugins/aws/route53/domainTransferLock.js +++ b/plugins/aws/route53/domainTransferLock.js @@ -34,31 +34,31 @@ module.exports = { return callback(null, results, source); } + + var dtlUnsupportedDomains= [ + '.za', + '.cl', + '.ar', + '.au', + '.nz', + '.au', + '.jp', + '.qa', + '.ru', + '.ch', + '.de', + '.es', + '.eu', + 'fi', + '.it', + '.nl', + '.se', + ]; + var unsupported = false; for (var i in listDomains.data) { var domain = listDomains.data[i]; if (!domain.DomainName) continue; - - var dtlUnsupportedRegions = [ - '.za', - '.cl', - '.ar', - '.au', - '.nz', - '.au', - '.jp', - '.qa', - '.ru', - '.ch', - '.de', - '.es', - '.eu', - 'fi', - '.it', - '.nl', - '.se', - ]; - var unsupported = false; - dtlUnsupportedRegions.forEach((region) => { + dtlUnsupportedDomains.forEach((region) => { if (domain.DomainName.includes(region)) { unsupported = true; } From cf8a051d9512bdc592f6cc85d4d39e332f0f1e17 Mon Sep 17 00:00:00 2001 From: AkhtarAmir Date: Wed, 4 Sep 2024 19:49:21 +0500 Subject: [PATCH 3/4] r53 dtl fix --- plugins/aws/route53/domainTransferLock.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/aws/route53/domainTransferLock.js b/plugins/aws/route53/domainTransferLock.js index 64c4b6ab33..4b6fa36eff 100644 --- a/plugins/aws/route53/domainTransferLock.js +++ b/plugins/aws/route53/domainTransferLock.js @@ -55,14 +55,17 @@ module.exports = { '.se', ]; var unsupported = false; + for (var i in listDomains.data) { var domain = listDomains.data[i]; + if (!domain.DomainName) continue; + dtlUnsupportedDomains.forEach((region) => { if (domain.DomainName.includes(region)) { unsupported = true; } - }); + }) // Skip the unsupported domains if (unsupported) { helpers.addResult(results, 0, From cb3b0ae7e59190226d39df7487b88e8d11785afe Mon Sep 17 00:00:00 2001 From: alphadev4 <113519745+alphadev4@users.noreply.github.com> Date: Thu, 5 Sep 2024 11:50:26 +0500 Subject: [PATCH 4/4] Update plugins/aws/route53/domainTransferLock.js --- plugins/aws/route53/domainTransferLock.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/aws/route53/domainTransferLock.js b/plugins/aws/route53/domainTransferLock.js index 4b6fa36eff..64e147ab8c 100644 --- a/plugins/aws/route53/domainTransferLock.js +++ b/plugins/aws/route53/domainTransferLock.js @@ -65,7 +65,7 @@ module.exports = { if (domain.DomainName.includes(region)) { unsupported = true; } - }) + }); // Skip the unsupported domains if (unsupported) { helpers.addResult(results, 0,