diff --git a/changelog.md b/changelog.md index 2204b64..0fb3c73 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,12 @@ # Changelog +## 2025-09-12 - 7.6.1 - fix(classes.dnsclient) +Remove redundant DOH response parsing in getRecords to avoid duplicate processing and clean up client code + +- Removed a duplicated/extra iteration that parsed DNS-over-HTTPS (DoH) answers in ts_client/classes.dnsclient.ts. +- Prevents double-processing or incorrect return behavior from Smartdns.getRecords when using DoH providers. +- Changes affect the Smartdns client implementation (ts_client/classes.dnsclient.ts). + ## 2025-09-12 - 7.6.0 - feat(dnsserver) Return multiple matching records, improve DNSSEC RRset signing, add client resolution strategy and localhost handling, update tests diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 4094a21..beb27fe 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@push.rocks/smartdns', - version: '7.6.0', + version: '7.6.1', description: 'A robust TypeScript library providing advanced DNS management and resolution capabilities including support for DNSSEC, custom DNS servers, and integration with various DNS providers.' } diff --git a/ts_client/classes.dnsclient.ts b/ts_client/classes.dnsclient.ts index 8eaa629..9e6a910 100644 --- a/ts_client/classes.dnsclient.ts +++ b/ts_client/classes.dnsclient.ts @@ -252,23 +252,7 @@ export class Smartdns { return []; } } - for (const dnsEntry of responseBody.Answer) { - if (dnsEntry.data.startsWith('"') && dnsEntry.data.endsWith('"')) { - dnsEntry.data = dnsEntry.data.replace(/^"(.*)"$/, '$1'); - } - if (dnsEntry.name.endsWith('.')) { - dnsEntry.name = dnsEntry.name.substring(0, dnsEntry.name.length - 1); - } - returnArray.push({ - name: dnsEntry.name, - type: this.convertDnsTypeNumberToTypeName(dnsEntry.type), - dnsSecEnabled: responseBody.AD, - value: dnsEntry.data, - }); - } - // console.log(responseBody); - return returnArray; - } + /** * gets a record using nodejs dns resolver