Skip to content

Commit

Permalink
Merge branch 'master' into 2102-dnsrewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
ainar-g committed Dec 21, 2020
2 parents d9448dd + e7f7799 commit 8490fc1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ and this project adheres to

### Fixed

- Inability to set DNS cache TTL limits ([#2459]).
- Possible freezes on slower machines ([#2225]).
- A mitigation against records being shown in the wrong order on the query log
page ([#2293]).
Expand All @@ -69,6 +70,7 @@ and this project adheres to
[#2293]: https://github.com/AdguardTeam/AdGuardHome/issues/2293
[#2345]: https://github.com/AdguardTeam/AdGuardHome/issues/2345
[#2355]: https://github.com/AdguardTeam/AdGuardHome/issues/2355
[#2459]: https://github.com/AdguardTeam/AdGuardHome/issues/2459

### Removed

Expand Down
2 changes: 1 addition & 1 deletion client/src/helpers/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const validateClientId = (value) => {
if (!value) {
return undefined;
}
const formattedValue = value ? value.trim() : value;
const formattedValue = value.trim();
if (formattedValue && !(
R_IPV4.test(formattedValue)
|| R_IPV6.test(formattedValue)
Expand Down
3 changes: 2 additions & 1 deletion internal/dnsforward/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,12 @@ func (req *dnsConfig) checkCacheTTL() bool {
if req.CacheMinTTL == nil && req.CacheMaxTTL == nil {
return true
}

var min, max uint32
if req.CacheMinTTL != nil {
min = *req.CacheMinTTL
}
if req.CacheMaxTTL == nil {
if req.CacheMaxTTL != nil {
max = *req.CacheMaxTTL
}

Expand Down
1 change: 0 additions & 1 deletion internal/dnsforward/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ func (s *Server) genDNSFilterMessage(d *proxy.DNSContext, result *dnsfilter.Resu
if result.Reason == dnsfilter.FilteredSafeSearch &&
len(result.Rules) > 0 &&
result.Rules[0].IP != nil {

return s.genResponseWithIP(m, result.Rules[0].IP)
}

Expand Down
5 changes: 0 additions & 5 deletions scripts/querylog/anonymize.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ const fs = require('fs');
const readline = require('readline');
const dnsPacket = require('dns-packet')

const decodeBase64 = (data) => {
let buff = new Buffer(data, 'base64');
return buff.toString('ascii');
}

const processLineByLine = async (source, callback) => {
const fileStream = fs.createReadStream(source);

Expand Down

0 comments on commit 8490fc1

Please sign in to comment.