git ssb

15+

ansuz / dnssb



Commit f8c217e3967fa2aab3fc617265b7f3a9bf80eb7b

Expand wildcards in response to match question

cel committed on 11/26/2016, 9:00:24 PM
Parent: 62bf745eae69b5c115dd89dccad082a66f0a83a5

Files changed

lib/query.jschanged
lib/query.jsView
@@ -365,8 +365,19 @@
365365 // include SOA if there are no answers, NS if there are
366366 result.authorities = result.authorities.filter(function (r) {
367367 return r.type !== (result.answers.length ? 'SOA' : 'NS');
368368 });
369 +
370 + // resolve wildcards in answers
371 + result.answers = result.answers.map(function (r) {
372 + return r.name !== qName
373 + && r.name in wildcardDomains ? {
374 + name: qName,
375 + type: r.type,
376 + class: r.class,
377 + data: r.data,
378 + } : r;
379 + })
369380 }
370381 cb(null, result);
371382 }));
372383 };

Built with git-ssb-web