mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
refactor(route53): use DomainNames.isWithin for the record set zone check (#6712)
This commit is contained in:
1 parent
9e14ffe92a
commit
8a3d769c70
1 file changed
+1
-1
@@ -974,7 +974,7 @@ public class Route53Service implements Resettable {
|
||||
List<ResourceRecordSet> current, String zoneName) {
|
||||
String recordName = normalizeRecordName(rrs.getName());
|
||||
String zone = normalizeRecordName(zoneName);
|
||||
if (!".".equals(zone) && !recordName.equals(zone) && !recordName.endsWith("." + zone)) {
|
||||
if (!".".equals(zone) && !DomainNames.isWithin(recordName, zone)) {
|
||||
throw new AwsException("InvalidChangeBatch",
|
||||
"RRSet with DNS name " + normalizeName(rrs.getName()) + " is not permitted in zone "
|
||||
+ normalizeName(zoneName), 400);
|
||||
|
||||
Reference in new issue
Block a user