docstring_tokens
stringlengths
0
76.5k
code_tokens
stringlengths
75
1.81M
label_window
listlengths
4
2.12k
html_url
stringlengths
74
116
file_name
stringlengths
3
311
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
<mask> google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= <mask> google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= <mask> google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= <mask> google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= <mask> google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= <mask> google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= </s> Pull request: all: update go and backend tools Updates #2275. Squashed commit of the following: commit f24c26cd2b49fac00a581936da4ccb13ca341bc9 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:33:15 2021 +0300 aghtest: imp docs commit 46f5b06f9743e800b489e8c30af07d24bfdcf989 Merge: bfb852cb 55d4c7ee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:32:32 2021 +0300 Merge branch 'master' into 2275-upd commit bfb852cbc74ec219a41e985f2dcb090d58299aee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 19:06:32 2021 +0300 scripts: rem unsupported platform commit c1645e247f18d384a980c60d3a94b9363f83f174 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:47:57 2021 +0300 all: rollback more commit 989811b5e38498234dc11baf5dd153c76b9dada4 Merge: 976bdfbd 2d704242 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:30:42 2021 +0300 Merge branch 'master' into 2275-upd commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:28:23 2021 +0300 aghtest: fix os_windows commit 9e85080eefe882d72c939969f7008e3c46467c0c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:15:37 2021 +0300 all: rewrite windows workaround, imp code, docs commit 35a0b1d8656640a962fe9ae019c3d665f42707ce Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jan 21 20:38:17 2021 +0300 all: update go and backend tools </s> remove // TODO(a.garipov): Uncomment and remove the code below in Go 1.15. // // wd := t.TempDir() wd, err := ioutil.TempDir("", "aghtest") assert.Nil(t, err) t.Cleanup(func() { assert.Nil(t, os.RemoveAll(wd)) }) </s> add wd := aghtest.PrepareTestDir(t) </s> remove // LookupIPAddr implements Resolver interface for *testResolver. It returns the // slice of net.IPAddr with IPv4 and IPv6 instances. func (r *TestResolver) LookupIPAddr(_ context.Context, host string) (ips []net.IPAddr, err error) { </s> add // LookupIP implements Resolver interface for *testResolver. It returns the // slice of net.IP with IPv4 and IPv6 instances. func (r *TestResolver) LookupIP(_ context.Context, _, host string) (ips []net.IP, err error) { </s> remove ipAddrs, err := resolver.LookupIPAddr(context.Background(), safeDomain) </s> add ips, err := resolver.LookupIP(context.Background(), "ip", safeDomain) </s> remove assert.Len(t, res.Rules, 1) </s> add if assert.Len(t, res.Rules, 1) { assert.NotEqual(t, res.Rules[0].IP.String(), "0.0.0.0") }
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc
internal/tools/go.sum
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
<mask> google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= <mask> google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= <mask> gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= <mask> gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= <mask> gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= <mask> gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= <mask> gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= <mask> gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= </s> Pull request: all: update go and backend tools Updates #2275. Squashed commit of the following: commit f24c26cd2b49fac00a581936da4ccb13ca341bc9 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:33:15 2021 +0300 aghtest: imp docs commit 46f5b06f9743e800b489e8c30af07d24bfdcf989 Merge: bfb852cb 55d4c7ee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:32:32 2021 +0300 Merge branch 'master' into 2275-upd commit bfb852cbc74ec219a41e985f2dcb090d58299aee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 19:06:32 2021 +0300 scripts: rem unsupported platform commit c1645e247f18d384a980c60d3a94b9363f83f174 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:47:57 2021 +0300 all: rollback more commit 989811b5e38498234dc11baf5dd153c76b9dada4 Merge: 976bdfbd 2d704242 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:30:42 2021 +0300 Merge branch 'master' into 2275-upd commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:28:23 2021 +0300 aghtest: fix os_windows commit 9e85080eefe882d72c939969f7008e3c46467c0c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:15:37 2021 +0300 all: rewrite windows workaround, imp code, docs commit 35a0b1d8656640a962fe9ae019c3d665f42707ce Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jan 21 20:38:17 2021 +0300 all: update go and backend tools </s> remove wantIsFiltered bool </s> add </s> remove ipAddrs, err := resolver.LookupIPAddr(context.Background(), safeDomain) </s> add ips, err := resolver.LookupIP(context.Background(), "ip", safeDomain) </s> remove assert.Len(t, res.Rules, 1) </s> add if assert.Len(t, res.Rules, 1) { assert.NotEqual(t, res.Rules[0].IP.String(), "0.0.0.0") }
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc
internal/tools/go.sum
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
<mask> gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= <mask> gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= <mask> gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= <mask> gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= <mask> gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= <mask> gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= <mask> gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= <mask> gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= <mask> gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= </s> Pull request: all: update go and backend tools Updates #2275. Squashed commit of the following: commit f24c26cd2b49fac00a581936da4ccb13ca341bc9 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:33:15 2021 +0300 aghtest: imp docs commit 46f5b06f9743e800b489e8c30af07d24bfdcf989 Merge: bfb852cb 55d4c7ee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:32:32 2021 +0300 Merge branch 'master' into 2275-upd commit bfb852cbc74ec219a41e985f2dcb090d58299aee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 19:06:32 2021 +0300 scripts: rem unsupported platform commit c1645e247f18d384a980c60d3a94b9363f83f174 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:47:57 2021 +0300 all: rollback more commit 989811b5e38498234dc11baf5dd153c76b9dada4 Merge: 976bdfbd 2d704242 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:30:42 2021 +0300 Merge branch 'master' into 2275-upd commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:28:23 2021 +0300 aghtest: fix os_windows commit 9e85080eefe882d72c939969f7008e3c46467c0c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:15:37 2021 +0300 all: rewrite windows workaround, imp code, docs commit 35a0b1d8656640a962fe9ae019c3d665f42707ce Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jan 21 20:38:17 2021 +0300 all: update go and backend tools </s> remove howett.net/plist v0.0.0-20201026045517-117a925f2150 h1:s7O/9fwMNd6O1yXyQ8zv+U7dfl8k+zdiLWAY8h7XdVI= howett.net/plist v0.0.0-20201026045517-117a925f2150/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= </s> add howett.net/plist v0.0.0-20201203080718-1454fab16a06 h1:QDxUo/w2COstK1wIBYpzQlHX/NqaQTcf9jyz347nI58= howett.net/plist v0.0.0-20201203080718-1454fab16a06/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0=
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc
internal/tools/go.sum
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
<mask> gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= <mask> gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= <mask> gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= <mask> gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= <mask> gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= <mask> gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= <mask> gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= <mask> gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= </s> Pull request: all: update go and backend tools Updates #2275. Squashed commit of the following: commit f24c26cd2b49fac00a581936da4ccb13ca341bc9 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:33:15 2021 +0300 aghtest: imp docs commit 46f5b06f9743e800b489e8c30af07d24bfdcf989 Merge: bfb852cb 55d4c7ee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:32:32 2021 +0300 Merge branch 'master' into 2275-upd commit bfb852cbc74ec219a41e985f2dcb090d58299aee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 19:06:32 2021 +0300 scripts: rem unsupported platform commit c1645e247f18d384a980c60d3a94b9363f83f174 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:47:57 2021 +0300 all: rollback more commit 989811b5e38498234dc11baf5dd153c76b9dada4 Merge: 976bdfbd 2d704242 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:30:42 2021 +0300 Merge branch 'master' into 2275-upd commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:28:23 2021 +0300 aghtest: fix os_windows commit 9e85080eefe882d72c939969f7008e3c46467c0c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:15:37 2021 +0300 all: rewrite windows workaround, imp code, docs commit 35a0b1d8656640a962fe9ae019c3d665f42707ce Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jan 21 20:38:17 2021 +0300 all: update go and backend tools </s> remove gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= </s> add gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc
internal/tools/go.sum
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
<mask> gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= <mask> gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= <mask> gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= <mask> gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= <mask> gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= <mask> gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= </s> Pull request: all: update go and backend tools Updates #2275. Squashed commit of the following: commit f24c26cd2b49fac00a581936da4ccb13ca341bc9 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:33:15 2021 +0300 aghtest: imp docs commit 46f5b06f9743e800b489e8c30af07d24bfdcf989 Merge: bfb852cb 55d4c7ee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:32:32 2021 +0300 Merge branch 'master' into 2275-upd commit bfb852cbc74ec219a41e985f2dcb090d58299aee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 19:06:32 2021 +0300 scripts: rem unsupported platform commit c1645e247f18d384a980c60d3a94b9363f83f174 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:47:57 2021 +0300 all: rollback more commit 989811b5e38498234dc11baf5dd153c76b9dada4 Merge: 976bdfbd 2d704242 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:30:42 2021 +0300 Merge branch 'master' into 2275-upd commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:28:23 2021 +0300 aghtest: fix os_windows commit 9e85080eefe882d72c939969f7008e3c46467c0c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:15:37 2021 +0300 all: rewrite windows workaround, imp code, docs commit 35a0b1d8656640a962fe9ae019c3d665f42707ce Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jan 21 20:38:17 2021 +0300 all: update go and backend tools </s> remove gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= </s> add gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= </s> remove honnef.co/go/tools v0.0.1-2020.1.6 h1:W18jzjh8mfPez+AwGLxmOImucz/IFjpNlrKVnaj2YVc= honnef.co/go/tools v0.0.1-2020.1.6/go.mod h1:pyyisuGw24ruLjrr1ddx39WE0y9OooInRzEYLhQB2YY= honnef.co/go/tools v0.1.0 h1:AWNL1W1i7f0wNZ8VwOKNJ0sliKvOF/adn0EHenfUh+c= honnef.co/go/tools v0.1.0/go.mod h1:XtegFAyX/PfluP4921rXU5IkjkqBCDnUq4W8VCIoKvM= mvdan.cc/gofumpt v0.0.0-20201129102820-5c11c50e9475 h1:5ZmJGYyuTlhdlIpRxSFhdJqkXQweXETFCEaLhRAX3e8= mvdan.cc/gofumpt v0.0.0-20201129102820-5c11c50e9475/go.mod h1:E4LOcu9JQEtnYXtB1Y51drqh2Qr2Ngk9J3YrRCwcbd0= mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7 h1:kAREL6MPwpsk1/PQPFD3Eg7WAQR5mPTWZJaBiG5LDbY= mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7/go.mod h1:HGC5lll35J70Y5v7vCGb9oLhHoScFwkHDJm/05RdSTc= </s> add gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3 h1:qTakTkI6ni6LFD5sBwwsdSO+AQqbSIxOauHTTQKZ/7o= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= mvdan.cc/gofumpt v0.1.0 h1:hsVv+Y9UsZ/mFZTxJZuHVI6shSQCtzZ11h1JEFPAZLw= mvdan.cc/gofumpt v0.1.0/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7 h1:HT3e4Krq+IE44tiN36RvVEb6tvqeIdtsVSsxmNPqlFU= mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7/go.mod h1:hBpJkZE8H/sb+VRFvw2+rBpHNsTBcvSpk61hr8mzXZE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc
internal/tools/go.sum
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
<mask> gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= <mask> gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= <mask> gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= <mask> gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= <mask> gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= <mask> gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= <mask> gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= <mask> gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= </s> Pull request: all: update go and backend tools Updates #2275. Squashed commit of the following: commit f24c26cd2b49fac00a581936da4ccb13ca341bc9 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:33:15 2021 +0300 aghtest: imp docs commit 46f5b06f9743e800b489e8c30af07d24bfdcf989 Merge: bfb852cb 55d4c7ee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:32:32 2021 +0300 Merge branch 'master' into 2275-upd commit bfb852cbc74ec219a41e985f2dcb090d58299aee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 19:06:32 2021 +0300 scripts: rem unsupported platform commit c1645e247f18d384a980c60d3a94b9363f83f174 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:47:57 2021 +0300 all: rollback more commit 989811b5e38498234dc11baf5dd153c76b9dada4 Merge: 976bdfbd 2d704242 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:30:42 2021 +0300 Merge branch 'master' into 2275-upd commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:28:23 2021 +0300 aghtest: fix os_windows commit 9e85080eefe882d72c939969f7008e3c46467c0c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:15:37 2021 +0300 all: rewrite windows workaround, imp code, docs commit 35a0b1d8656640a962fe9ae019c3d665f42707ce Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jan 21 20:38:17 2021 +0300 all: update go and backend tools </s> remove gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= </s> add gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= </s> remove honnef.co/go/tools v0.0.1-2020.1.6 h1:W18jzjh8mfPez+AwGLxmOImucz/IFjpNlrKVnaj2YVc= honnef.co/go/tools v0.0.1-2020.1.6/go.mod h1:pyyisuGw24ruLjrr1ddx39WE0y9OooInRzEYLhQB2YY= honnef.co/go/tools v0.1.0 h1:AWNL1W1i7f0wNZ8VwOKNJ0sliKvOF/adn0EHenfUh+c= honnef.co/go/tools v0.1.0/go.mod h1:XtegFAyX/PfluP4921rXU5IkjkqBCDnUq4W8VCIoKvM= mvdan.cc/gofumpt v0.0.0-20201129102820-5c11c50e9475 h1:5ZmJGYyuTlhdlIpRxSFhdJqkXQweXETFCEaLhRAX3e8= mvdan.cc/gofumpt v0.0.0-20201129102820-5c11c50e9475/go.mod h1:E4LOcu9JQEtnYXtB1Y51drqh2Qr2Ngk9J3YrRCwcbd0= mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7 h1:kAREL6MPwpsk1/PQPFD3Eg7WAQR5mPTWZJaBiG5LDbY= mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7/go.mod h1:HGC5lll35J70Y5v7vCGb9oLhHoScFwkHDJm/05RdSTc= </s> add gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3 h1:qTakTkI6ni6LFD5sBwwsdSO+AQqbSIxOauHTTQKZ/7o= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= mvdan.cc/gofumpt v0.1.0 h1:hsVv+Y9UsZ/mFZTxJZuHVI6shSQCtzZ11h1JEFPAZLw= mvdan.cc/gofumpt v0.1.0/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7 h1:HT3e4Krq+IE44tiN36RvVEb6tvqeIdtsVSsxmNPqlFU= mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7/go.mod h1:hBpJkZE8H/sb+VRFvw2+rBpHNsTBcvSpk61hr8mzXZE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc
internal/tools/go.sum
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
<mask> gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= <mask> gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= <mask> gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= <mask> gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= <mask> gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= <mask> gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= <mask> gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= <mask> gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= <mask> honnef.co/go/tools v0.0.1-2020.1.6 h1:W18jzjh8mfPez+AwGLxmOImucz/IFjpNlrKVnaj2YVc= <mask> honnef.co/go/tools v0.0.1-2020.1.6/go.mod h1:pyyisuGw24ruLjrr1ddx39WE0y9OooInRzEYLhQB2YY= </s> Pull request: all: update go and backend tools Updates #2275. Squashed commit of the following: commit f24c26cd2b49fac00a581936da4ccb13ca341bc9 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:33:15 2021 +0300 aghtest: imp docs commit 46f5b06f9743e800b489e8c30af07d24bfdcf989 Merge: bfb852cb 55d4c7ee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:32:32 2021 +0300 Merge branch 'master' into 2275-upd commit bfb852cbc74ec219a41e985f2dcb090d58299aee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 19:06:32 2021 +0300 scripts: rem unsupported platform commit c1645e247f18d384a980c60d3a94b9363f83f174 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:47:57 2021 +0300 all: rollback more commit 989811b5e38498234dc11baf5dd153c76b9dada4 Merge: 976bdfbd 2d704242 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:30:42 2021 +0300 Merge branch 'master' into 2275-upd commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:28:23 2021 +0300 aghtest: fix os_windows commit 9e85080eefe882d72c939969f7008e3c46467c0c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:15:37 2021 +0300 all: rewrite windows workaround, imp code, docs commit 35a0b1d8656640a962fe9ae019c3d665f42707ce Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jan 21 20:38:17 2021 +0300 all: update go and backend tools </s> remove honnef.co/go/tools v0.0.1-2020.1.6 h1:W18jzjh8mfPez+AwGLxmOImucz/IFjpNlrKVnaj2YVc= honnef.co/go/tools v0.0.1-2020.1.6/go.mod h1:pyyisuGw24ruLjrr1ddx39WE0y9OooInRzEYLhQB2YY= honnef.co/go/tools v0.1.0 h1:AWNL1W1i7f0wNZ8VwOKNJ0sliKvOF/adn0EHenfUh+c= honnef.co/go/tools v0.1.0/go.mod h1:XtegFAyX/PfluP4921rXU5IkjkqBCDnUq4W8VCIoKvM= mvdan.cc/gofumpt v0.0.0-20201129102820-5c11c50e9475 h1:5ZmJGYyuTlhdlIpRxSFhdJqkXQweXETFCEaLhRAX3e8= mvdan.cc/gofumpt v0.0.0-20201129102820-5c11c50e9475/go.mod h1:E4LOcu9JQEtnYXtB1Y51drqh2Qr2Ngk9J3YrRCwcbd0= mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7 h1:kAREL6MPwpsk1/PQPFD3Eg7WAQR5mPTWZJaBiG5LDbY= mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7/go.mod h1:HGC5lll35J70Y5v7vCGb9oLhHoScFwkHDJm/05RdSTc= </s> add gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3 h1:qTakTkI6ni6LFD5sBwwsdSO+AQqbSIxOauHTTQKZ/7o= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= mvdan.cc/gofumpt v0.1.0 h1:hsVv+Y9UsZ/mFZTxJZuHVI6shSQCtzZ11h1JEFPAZLw= mvdan.cc/gofumpt v0.1.0/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7 h1:HT3e4Krq+IE44tiN36RvVEb6tvqeIdtsVSsxmNPqlFU= mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7/go.mod h1:hBpJkZE8H/sb+VRFvw2+rBpHNsTBcvSpk61hr8mzXZE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc
internal/tools/go.sum
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3 h1:qTakTkI6ni6LFD5sBwwsdSO+AQqbSIxOauHTTQKZ/7o= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= mvdan.cc/gofumpt v0.1.0 h1:hsVv+Y9UsZ/mFZTxJZuHVI6shSQCtzZ11h1JEFPAZLw= mvdan.cc/gofumpt v0.1.0/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7 h1:HT3e4Krq+IE44tiN36RvVEb6tvqeIdtsVSsxmNPqlFU= mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7/go.mod h1:hBpJkZE8H/sb+VRFvw2+rBpHNsTBcvSpk61hr8mzXZE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
<mask> gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= <mask> gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= <mask> gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= <mask> gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= <mask> honnef.co/go/tools v0.0.1-2020.1.6 h1:W18jzjh8mfPez+AwGLxmOImucz/IFjpNlrKVnaj2YVc= <mask> honnef.co/go/tools v0.0.1-2020.1.6/go.mod h1:pyyisuGw24ruLjrr1ddx39WE0y9OooInRzEYLhQB2YY= <mask> honnef.co/go/tools v0.1.0 h1:AWNL1W1i7f0wNZ8VwOKNJ0sliKvOF/adn0EHenfUh+c= <mask> honnef.co/go/tools v0.1.0/go.mod h1:XtegFAyX/PfluP4921rXU5IkjkqBCDnUq4W8VCIoKvM= <mask> mvdan.cc/gofumpt v0.0.0-20201129102820-5c11c50e9475 h1:5ZmJGYyuTlhdlIpRxSFhdJqkXQweXETFCEaLhRAX3e8= <mask> mvdan.cc/gofumpt v0.0.0-20201129102820-5c11c50e9475/go.mod h1:E4LOcu9JQEtnYXtB1Y51drqh2Qr2Ngk9J3YrRCwcbd0= <mask> mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7 h1:kAREL6MPwpsk1/PQPFD3Eg7WAQR5mPTWZJaBiG5LDbY= <mask> mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7/go.mod h1:HGC5lll35J70Y5v7vCGb9oLhHoScFwkHDJm/05RdSTc= </s> Pull request: all: update go and backend tools Updates #2275. Squashed commit of the following: commit f24c26cd2b49fac00a581936da4ccb13ca341bc9 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:33:15 2021 +0300 aghtest: imp docs commit 46f5b06f9743e800b489e8c30af07d24bfdcf989 Merge: bfb852cb 55d4c7ee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:32:32 2021 +0300 Merge branch 'master' into 2275-upd commit bfb852cbc74ec219a41e985f2dcb090d58299aee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 19:06:32 2021 +0300 scripts: rem unsupported platform commit c1645e247f18d384a980c60d3a94b9363f83f174 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:47:57 2021 +0300 all: rollback more commit 989811b5e38498234dc11baf5dd153c76b9dada4 Merge: 976bdfbd 2d704242 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:30:42 2021 +0300 Merge branch 'master' into 2275-upd commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:28:23 2021 +0300 aghtest: fix os_windows commit 9e85080eefe882d72c939969f7008e3c46467c0c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:15:37 2021 +0300 all: rewrite windows workaround, imp code, docs commit 35a0b1d8656640a962fe9ae019c3d665f42707ce Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jan 21 20:38:17 2021 +0300 all: update go and backend tools </s> remove gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= </s> add gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= </s> remove github.com/securego/gosec/v2 v2.5.0 golang.org/x/lint v0.0.0-20200302205851-738671d3881b golang.org/x/mod v0.4.0 // indirect golang.org/x/tools v0.0.0-20201208062317-e652b2f42cc7 gopkg.in/yaml.v2 v2.4.0 // indirect honnef.co/go/tools v0.1.0 mvdan.cc/gofumpt v0.0.0-20201129102820-5c11c50e9475 mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7 </s> add github.com/securego/gosec/v2 v2.7.0 golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 golang.org/x/sys v0.0.0-20210309074719-68d13333faf2 // indirect golang.org/x/tools v0.1.0 honnef.co/go/tools v0.1.3 mvdan.cc/gofumpt v0.1.0 mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc
internal/tools/go.sum
<mask> // +build tools <mask> <mask> // Package tools and its main module are a nested internal module containing our <mask> // development tool dependencies. <mask> // <mask> // See https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module. <mask> package tools <mask> <mask> import ( <mask> _ "github.com/fzipp/gocyclo/cmd/gocyclo" <mask> _ "github.com/golangci/misspell/cmd/misspell" </s> Pull request: all: update go and backend tools Updates #2275. Squashed commit of the following: commit f24c26cd2b49fac00a581936da4ccb13ca341bc9 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:33:15 2021 +0300 aghtest: imp docs commit 46f5b06f9743e800b489e8c30af07d24bfdcf989 Merge: bfb852cb 55d4c7ee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:32:32 2021 +0300 Merge branch 'master' into 2275-upd commit bfb852cbc74ec219a41e985f2dcb090d58299aee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 19:06:32 2021 +0300 scripts: rem unsupported platform commit c1645e247f18d384a980c60d3a94b9363f83f174 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:47:57 2021 +0300 all: rollback more commit 989811b5e38498234dc11baf5dd153c76b9dada4 Merge: 976bdfbd 2d704242 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:30:42 2021 +0300 Merge branch 'master' into 2275-upd commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:28:23 2021 +0300 aghtest: fix os_windows commit 9e85080eefe882d72c939969f7008e3c46467c0c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:15:37 2021 +0300 all: rewrite windows workaround, imp code, docs commit 35a0b1d8656640a962fe9ae019c3d665f42707ce Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jan 21 20:38:17 2021 +0300 all: update go and backend tools </s> remove dmitri.shuralyov.com/go/generated v0.0.0-20170818220700-b1254a446363 // indirect github.com/client9/misspell v0.3.4 // indirect </s> add </s> remove "io/ioutil" "os" "runtime" </s> add </s> remove go 1.14 </s> add go 1.15 </s> remove // // TODO(e.burkov): Replace with LookupIP after upgrading go to v1.15. </s> add </s> remove github.com/google/go-cmp v0.5.4 // indirect github.com/gookit/color v1.3.3 // indirect github.com/gordonklaus/ineffassign v0.0.0-20201107091007-3b93a8888063 github.com/kisielk/errcheck v1.4.0 </s> add github.com/google/go-cmp v0.5.5 // indirect github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254 github.com/kisielk/errcheck v1.6.0
[ "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc
internal/tools/tools.go
<mask> "io/ioutil" <mask> "net" <mask> "net/http" <mask> "net/url" <mask> "os" <mask> "path" <mask> "path/filepath" <mask> "strconv" <mask> "testing" <mask> </s> Pull request: all: update go and backend tools Updates #2275. Squashed commit of the following: commit f24c26cd2b49fac00a581936da4ccb13ca341bc9 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:33:15 2021 +0300 aghtest: imp docs commit 46f5b06f9743e800b489e8c30af07d24bfdcf989 Merge: bfb852cb 55d4c7ee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:32:32 2021 +0300 Merge branch 'master' into 2275-upd commit bfb852cbc74ec219a41e985f2dcb090d58299aee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 19:06:32 2021 +0300 scripts: rem unsupported platform commit c1645e247f18d384a980c60d3a94b9363f83f174 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:47:57 2021 +0300 all: rollback more commit 989811b5e38498234dc11baf5dd153c76b9dada4 Merge: 976bdfbd 2d704242 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:30:42 2021 +0300 Merge branch 'master' into 2275-upd commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:28:23 2021 +0300 aghtest: fix os_windows commit 9e85080eefe882d72c939969f7008e3c46467c0c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:15:37 2021 +0300 all: rewrite windows workaround, imp code, docs commit 35a0b1d8656640a962fe9ae019c3d665f42707ce Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jan 21 20:38:17 2021 +0300 all: update go and backend tools </s> remove "io/ioutil" "os" "runtime" </s> add </s> remove "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" </s> add </s> remove "github.com/AdguardTeam/dnsproxy/proxyutil" </s> add </s> remove // TODO(a.garipov): Uncomment and remove the code below in Go 1.15. // // wd := t.TempDir() wd, err := ioutil.TempDir("", "aghtest") assert.Nil(t, err) t.Cleanup(func() { assert.Nil(t, os.RemoveAll(wd)) }) </s> add wd := aghtest.PrepareTestDir(t) </s> remove addrs := []net.IPAddr{{ IP: ipv4, }, { IP: ipv6, }} </s> add addrs := []net.IP{ipv4, ipv6}
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc
internal/updater/updater_test.go
wd := aghtest.PrepareTestDir(t)
<mask> assert.Nil(t, err) <mask> } <mask> <mask> func TestUpdate(t *testing.T) { <mask> // TODO(a.garipov): Uncomment and remove the code below in Go 1.15. <mask> // <mask> // wd := t.TempDir() <mask> wd, err := ioutil.TempDir("", "aghtest") <mask> assert.Nil(t, err) <mask> t.Cleanup(func() { assert.Nil(t, os.RemoveAll(wd)) }) <mask> <mask> assert.Nil(t, ioutil.WriteFile(filepath.Join(wd, "AdGuardHome"), []byte("AdGuardHome"), 0o755)) <mask> assert.Nil(t, ioutil.WriteFile(filepath.Join(wd, "README.md"), []byte("README.md"), 0o644)) <mask> assert.Nil(t, ioutil.WriteFile(filepath.Join(wd, "LICENSE.txt"), []byte("LICENSE.txt"), 0o644)) <mask> assert.Nil(t, ioutil.WriteFile(filepath.Join(wd, "AdGuardHome.yaml"), []byte("AdGuardHome.yaml"), 0o644)) </s> Pull request: all: update go and backend tools Updates #2275. Squashed commit of the following: commit f24c26cd2b49fac00a581936da4ccb13ca341bc9 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:33:15 2021 +0300 aghtest: imp docs commit 46f5b06f9743e800b489e8c30af07d24bfdcf989 Merge: bfb852cb 55d4c7ee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:32:32 2021 +0300 Merge branch 'master' into 2275-upd commit bfb852cbc74ec219a41e985f2dcb090d58299aee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 19:06:32 2021 +0300 scripts: rem unsupported platform commit c1645e247f18d384a980c60d3a94b9363f83f174 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:47:57 2021 +0300 all: rollback more commit 989811b5e38498234dc11baf5dd153c76b9dada4 Merge: 976bdfbd 2d704242 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:30:42 2021 +0300 Merge branch 'master' into 2275-upd commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:28:23 2021 +0300 aghtest: fix os_windows commit 9e85080eefe882d72c939969f7008e3c46467c0c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:15:37 2021 +0300 all: rewrite windows workaround, imp code, docs commit 35a0b1d8656640a962fe9ae019c3d665f42707ce Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jan 21 20:38:17 2021 +0300 all: update go and backend tools </s> remove // TODO(a.garipov): Uncomment and remove the code below in Go 1.15. // // wd := t.TempDir() wd, err := ioutil.TempDir("", "aghtest") assert.Nil(t, err) t.Cleanup(func() { assert.Nil(t, os.RemoveAll(wd)) }) </s> add wd := aghtest.PrepareTestDir(t) </s> remove wd, err := os.Getwd() require.Nil(t, err) dir, err = ioutil.TempDir(wd, "agh-test") require.Nil(t, err) require.NotEmpty(t, dir) t.Cleanup(func() { // TODO(e.burkov): Replace with t.TempDir methods after updating // go version to 1.15. start := time.Now() for { err := os.RemoveAll(dir) if err == nil { break } if runtime.GOOS != "windows" || time.Since(start) >= 500*time.Millisecond { break } time.Sleep(5 * time.Millisecond) } assert.Nil(t, err) }) return dir </s> add return prepareTestDir(t) </s> remove assert.Len(t, res.Rules, 1) </s> add if assert.Len(t, res.Rules, 1) { assert.NotEqual(t, res.Rules[0].IP.String(), "0.0.0.0") } </s> remove // LookupIPAddr implements Resolver interface for *testResolver. It returns the // slice of net.IPAddr with IPv4 and IPv6 instances. func (r *TestResolver) LookupIPAddr(_ context.Context, host string) (ips []net.IPAddr, err error) { </s> add // LookupIP implements Resolver interface for *testResolver. It returns the // slice of net.IP with IPv4 and IPv6 instances. func (r *TestResolver) LookupIP(_ context.Context, _, host string) (ips []net.IP, err error) { </s> remove addrs := []net.IPAddr{{ IP: ipv4, }, { IP: ipv6, }} </s> add addrs := []net.IP{ipv4, ipv6}
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc
internal/updater/updater_test.go
wd := aghtest.PrepareTestDir(t)
<mask> assert.Equal(t, "AdGuardHome.yaml", string(d)) <mask> } <mask> <mask> func TestUpdateWindows(t *testing.T) { <mask> // TODO(a.garipov): Uncomment and remove the code below in Go 1.15. <mask> // <mask> // wd := t.TempDir() <mask> wd, err := ioutil.TempDir("", "aghtest") <mask> assert.Nil(t, err) <mask> t.Cleanup(func() { assert.Nil(t, os.RemoveAll(wd)) }) <mask> <mask> assert.Nil(t, ioutil.WriteFile(filepath.Join(wd, "AdGuardHome.exe"), []byte("AdGuardHome.exe"), 0o755)) <mask> assert.Nil(t, ioutil.WriteFile(filepath.Join(wd, "README.md"), []byte("README.md"), 0o644)) <mask> assert.Nil(t, ioutil.WriteFile(filepath.Join(wd, "LICENSE.txt"), []byte("LICENSE.txt"), 0o644)) <mask> assert.Nil(t, ioutil.WriteFile(filepath.Join(wd, "AdGuardHome.yaml"), []byte("AdGuardHome.yaml"), 0o644)) </s> Pull request: all: update go and backend tools Updates #2275. Squashed commit of the following: commit f24c26cd2b49fac00a581936da4ccb13ca341bc9 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:33:15 2021 +0300 aghtest: imp docs commit 46f5b06f9743e800b489e8c30af07d24bfdcf989 Merge: bfb852cb 55d4c7ee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 21:32:32 2021 +0300 Merge branch 'master' into 2275-upd commit bfb852cbc74ec219a41e985f2dcb090d58299aee Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 19:06:32 2021 +0300 scripts: rem unsupported platform commit c1645e247f18d384a980c60d3a94b9363f83f174 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:47:57 2021 +0300 all: rollback more commit 989811b5e38498234dc11baf5dd153c76b9dada4 Merge: 976bdfbd 2d704242 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:30:42 2021 +0300 Merge branch 'master' into 2275-upd commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:28:23 2021 +0300 aghtest: fix os_windows commit 9e85080eefe882d72c939969f7008e3c46467c0c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 10 18:15:37 2021 +0300 all: rewrite windows workaround, imp code, docs commit 35a0b1d8656640a962fe9ae019c3d665f42707ce Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jan 21 20:38:17 2021 +0300 all: update go and backend tools </s> remove // TODO(a.garipov): Uncomment and remove the code below in Go 1.15. // // wd := t.TempDir() wd, err := ioutil.TempDir("", "aghtest") assert.Nil(t, err) t.Cleanup(func() { assert.Nil(t, os.RemoveAll(wd)) }) </s> add wd := aghtest.PrepareTestDir(t) </s> remove wd, err := os.Getwd() require.Nil(t, err) dir, err = ioutil.TempDir(wd, "agh-test") require.Nil(t, err) require.NotEmpty(t, dir) t.Cleanup(func() { // TODO(e.burkov): Replace with t.TempDir methods after updating // go version to 1.15. start := time.Now() for { err := os.RemoveAll(dir) if err == nil { break } if runtime.GOOS != "windows" || time.Since(start) >= 500*time.Millisecond { break } time.Sleep(5 * time.Millisecond) } assert.Nil(t, err) }) return dir </s> add return prepareTestDir(t) </s> remove assert.Len(t, res.Rules, 1) </s> add if assert.Len(t, res.Rules, 1) { assert.NotEqual(t, res.Rules[0].IP.String(), "0.0.0.0") } </s> remove // LookupIPAddr implements Resolver interface for *testResolver. It returns the // slice of net.IPAddr with IPv4 and IPv6 instances. func (r *TestResolver) LookupIPAddr(_ context.Context, host string) (ips []net.IPAddr, err error) { </s> add // LookupIP implements Resolver interface for *testResolver. It returns the // slice of net.IP with IPv4 and IPv6 instances. func (r *TestResolver) LookupIP(_ context.Context, _, host string) (ips []net.IP, err error) { </s> remove addrs := []net.IPAddr{{ IP: ipv4, }, { IP: ipv6, }} </s> add addrs := []net.IP{ipv4, ipv6}
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc
internal/updater/updater_test.go
err = u.prepare(execPath)
<mask> if err != nil { <mask> return err <mask> } <mask> <mask> err = u.prepare(filepath.Base(execPath)) <mask> if err != nil { <mask> return err <mask> } <mask> <mask> defer u.clean() </s> Pull request: 4219-updater-1 Merge in DNS/adguard-home from 4219-updater-1 to master Squashed commit of the following: commit 5721a0032150c9a0b8bd940542860c262adfe646 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 14:50:56 2022 +0300 updater: imp code commit a18ccb2174af3d68c85e40aed5167c01523b0e67 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 13:49:23 2022 +0300 updater: exe name commit deb5c7bee63a3b5eb7aa722268857ebcfc7f053d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 10:05:00 2022 +0300 updater: exe name </s> remove u.currentExeName = filepath.Join(u.workDir, exeName) </s> add u.currentExeName = exePath </s> remove func (u *Updater) prepare(exeName string) (err error) { </s> add func (u *Updater) prepare(exePath string) (err error) { </s> remove d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome.yaml")) </s> add d, err = os.ReadFile(yamlPath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome.yaml")) </s> add d, err = os.ReadFile(yamlPath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "LICENSE.txt")) </s> add d, err = os.ReadFile(licensePath)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c098960b399be1240e0f34de5a888fea427cbc52
internal/updater/updater.go
func (u *Updater) prepare(exePath string) (err error) {
<mask> return u.versionCheckURL <mask> } <mask> <mask> // prepare fills all necessary fields in Updater object. <mask> func (u *Updater) prepare(exeName string) (err error) { <mask> u.updateDir = filepath.Join(u.workDir, fmt.Sprintf("agh-update-%s", u.newVersion)) <mask> <mask> _, pkgNameOnly := filepath.Split(u.packageURL) <mask> if pkgNameOnly == "" { <mask> return fmt.Errorf("invalid PackageURL") </s> Pull request: 4219-updater-1 Merge in DNS/adguard-home from 4219-updater-1 to master Squashed commit of the following: commit 5721a0032150c9a0b8bd940542860c262adfe646 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 14:50:56 2022 +0300 updater: imp code commit a18ccb2174af3d68c85e40aed5167c01523b0e67 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 13:49:23 2022 +0300 updater: exe name commit deb5c7bee63a3b5eb7aa722268857ebcfc7f053d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 10:05:00 2022 +0300 updater: exe name </s> remove u.currentExeName = filepath.Join(u.workDir, exeName) </s> add u.currentExeName = exePath </s> remove err = u.prepare(filepath.Base(execPath)) </s> add err = u.prepare(execPath) </s> remove u.backupExeName = filepath.Join(u.backupDir, exeName) </s> add u.backupExeName = filepath.Join(u.backupDir, filepath.Base(exePath)) </s> remove require.NoError(t, os.WriteFile(filepath.Join(wd, "AdGuardHome.exe"), []byte("AdGuardHome.exe"), 0o755)) require.NoError(t, os.WriteFile(filepath.Join(wd, "README.md"), []byte("README.md"), 0o644)) require.NoError(t, os.WriteFile(filepath.Join(wd, "LICENSE.txt"), []byte("LICENSE.txt"), 0o644)) require.NoError(t, os.WriteFile(filepath.Join(wd, "AdGuardHome.yaml"), []byte("AdGuardHome.yaml"), 0o644)) </s> add exePath := filepath.Join(wd, "AdGuardHome.exe") yamlPath := filepath.Join(wd, "AdGuardHome.yaml") readmePath := filepath.Join(wd, "README.md") licensePath := filepath.Join(wd, "LICENSE.txt") require.NoError(t, os.WriteFile(exePath, []byte("AdGuardHome.exe"), 0o755)) require.NoError(t, os.WriteFile(yamlPath, []byte("AdGuardHome.yaml"), 0o644)) require.NoError(t, os.WriteFile(readmePath, []byte("README.md"), 0o644)) require.NoError(t, os.WriteFile(licensePath, []byte("LICENSE.txt"), 0o644)) </s> remove require.NoError(t, os.WriteFile(filepath.Join(wd, "AdGuardHome"), []byte("AdGuardHome"), 0o755)) require.NoError(t, os.WriteFile(filepath.Join(wd, "README.md"), []byte("README.md"), 0o644)) require.NoError(t, os.WriteFile(filepath.Join(wd, "LICENSE.txt"), []byte("LICENSE.txt"), 0o644)) require.NoError(t, os.WriteFile(filepath.Join(wd, "AdGuardHome.yaml"), []byte("AdGuardHome.yaml"), 0o644)) </s> add exePath := filepath.Join(wd, "AdGuardHome") yamlPath := filepath.Join(wd, "AdGuardHome.yaml") readmePath := filepath.Join(wd, "README.md") licensePath := filepath.Join(wd, "LICENSE.txt") require.NoError(t, os.WriteFile(exePath, []byte("AdGuardHome"), 0o755)) require.NoError(t, os.WriteFile(yamlPath, []byte("AdGuardHome.yaml"), 0o644)) require.NoError(t, os.WriteFile(readmePath, []byte("README.md"), 0o644)) require.NoError(t, os.WriteFile(licensePath, []byte("LICENSE.txt"), 0o644))
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c098960b399be1240e0f34de5a888fea427cbc52
internal/updater/updater.go
u.backupExeName = filepath.Join(u.backupDir, filepath.Base(exePath))
<mask> if u.goos == "windows" { <mask> updateExeName = "AdGuardHome.exe" <mask> } <mask> <mask> u.backupExeName = filepath.Join(u.backupDir, exeName) <mask> u.updateExeName = filepath.Join(u.updateDir, updateExeName) <mask> <mask> log.Debug( <mask> "updater: updating from %s to %s using url: %s", <mask> version.Version(), </s> Pull request: 4219-updater-1 Merge in DNS/adguard-home from 4219-updater-1 to master Squashed commit of the following: commit 5721a0032150c9a0b8bd940542860c262adfe646 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 14:50:56 2022 +0300 updater: imp code commit a18ccb2174af3d68c85e40aed5167c01523b0e67 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 13:49:23 2022 +0300 updater: exe name commit deb5c7bee63a3b5eb7aa722268857ebcfc7f053d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 10:05:00 2022 +0300 updater: exe name </s> remove u.currentExeName = filepath.Join(u.workDir, exeName) </s> add u.currentExeName = exePath </s> remove err = u.prepare(filepath.Base(execPath)) </s> add err = u.prepare(execPath) </s> remove func (u *Updater) prepare(exeName string) (err error) { </s> add func (u *Updater) prepare(exePath string) (err error) { </s> remove u.confName = filepath.Join(u.workDir, "AdGuardHome.yaml") </s> add u.confName = yamlPath </s> remove u.confName = filepath.Join(u.workDir, "AdGuardHome.yaml") </s> add u.confName = yamlPath
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c098960b399be1240e0f34de5a888fea427cbc52
internal/updater/updater.go
u.currentExeName = exePath
<mask> u.newVersion, <mask> u.packageURL, <mask> ) <mask> <mask> u.currentExeName = filepath.Join(u.workDir, exeName) <mask> _, err = os.Stat(u.currentExeName) <mask> if err != nil { <mask> return fmt.Errorf("checking %q: %w", u.currentExeName, err) <mask> } <mask> </s> Pull request: 4219-updater-1 Merge in DNS/adguard-home from 4219-updater-1 to master Squashed commit of the following: commit 5721a0032150c9a0b8bd940542860c262adfe646 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 14:50:56 2022 +0300 updater: imp code commit a18ccb2174af3d68c85e40aed5167c01523b0e67 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 13:49:23 2022 +0300 updater: exe name commit deb5c7bee63a3b5eb7aa722268857ebcfc7f053d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 10:05:00 2022 +0300 updater: exe name </s> remove err = u.prepare(filepath.Base(execPath)) </s> add err = u.prepare(execPath) </s> remove func (u *Updater) prepare(exeName string) (err error) { </s> add func (u *Updater) prepare(exePath string) (err error) { </s> remove u.backupExeName = filepath.Join(u.backupDir, exeName) </s> add u.backupExeName = filepath.Join(u.backupDir, filepath.Base(exePath)) </s> remove d, err = os.ReadFile(filepath.Join(wd, "LICENSE.txt")) </s> add d, err = os.ReadFile(licensePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "LICENSE.txt")) </s> add d, err = os.ReadFile(licensePath)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c098960b399be1240e0f34de5a888fea427cbc52
internal/updater/updater.go
exePath := filepath.Join(wd, "AdGuardHome") yamlPath := filepath.Join(wd, "AdGuardHome.yaml") readmePath := filepath.Join(wd, "README.md") licensePath := filepath.Join(wd, "LICENSE.txt") require.NoError(t, os.WriteFile(exePath, []byte("AdGuardHome"), 0o755)) require.NoError(t, os.WriteFile(yamlPath, []byte("AdGuardHome.yaml"), 0o644)) require.NoError(t, os.WriteFile(readmePath, []byte("README.md"), 0o644)) require.NoError(t, os.WriteFile(licensePath, []byte("LICENSE.txt"), 0o644))
<mask> <mask> func TestUpdate(t *testing.T) { <mask> wd := t.TempDir() <mask> <mask> require.NoError(t, os.WriteFile(filepath.Join(wd, "AdGuardHome"), []byte("AdGuardHome"), 0o755)) <mask> require.NoError(t, os.WriteFile(filepath.Join(wd, "README.md"), []byte("README.md"), 0o644)) <mask> require.NoError(t, os.WriteFile(filepath.Join(wd, "LICENSE.txt"), []byte("LICENSE.txt"), 0o644)) <mask> require.NoError(t, os.WriteFile(filepath.Join(wd, "AdGuardHome.yaml"), []byte("AdGuardHome.yaml"), 0o644)) <mask> <mask> // start server for returning package file <mask> pkgData, err := os.ReadFile("testdata/AdGuardHome.tar.gz") <mask> require.NoError(t, err) <mask> </s> Pull request: 4219-updater-1 Merge in DNS/adguard-home from 4219-updater-1 to master Squashed commit of the following: commit 5721a0032150c9a0b8bd940542860c262adfe646 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 14:50:56 2022 +0300 updater: imp code commit a18ccb2174af3d68c85e40aed5167c01523b0e67 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 13:49:23 2022 +0300 updater: exe name commit deb5c7bee63a3b5eb7aa722268857ebcfc7f053d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 10:05:00 2022 +0300 updater: exe name </s> remove require.NoError(t, os.WriteFile(filepath.Join(wd, "AdGuardHome.exe"), []byte("AdGuardHome.exe"), 0o755)) require.NoError(t, os.WriteFile(filepath.Join(wd, "README.md"), []byte("README.md"), 0o644)) require.NoError(t, os.WriteFile(filepath.Join(wd, "LICENSE.txt"), []byte("LICENSE.txt"), 0o644)) require.NoError(t, os.WriteFile(filepath.Join(wd, "AdGuardHome.yaml"), []byte("AdGuardHome.yaml"), 0o644)) </s> add exePath := filepath.Join(wd, "AdGuardHome.exe") yamlPath := filepath.Join(wd, "AdGuardHome.yaml") readmePath := filepath.Join(wd, "README.md") licensePath := filepath.Join(wd, "LICENSE.txt") require.NoError(t, os.WriteFile(exePath, []byte("AdGuardHome.exe"), 0o755)) require.NoError(t, os.WriteFile(yamlPath, []byte("AdGuardHome.yaml"), 0o644)) require.NoError(t, os.WriteFile(readmePath, []byte("README.md"), 0o644)) require.NoError(t, os.WriteFile(licensePath, []byte("LICENSE.txt"), 0o644)) </s> remove func (u *Updater) prepare(exeName string) (err error) { </s> add func (u *Updater) prepare(exePath string) (err error) { </s> remove d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome.yaml")) </s> add d, err = os.ReadFile(yamlPath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome.yaml")) </s> add d, err = os.ReadFile(yamlPath) </s> remove require.NoError(t, u.prepare("AdGuardHome")) u.currentExeName = filepath.Join(wd, "AdGuardHome") </s> add require.NoError(t, u.prepare(exePath))
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c098960b399be1240e0f34de5a888fea427cbc52
internal/updater/updater_test.go
u.confName = yamlPath
<mask> Path: "AdGuardHome.tar.gz", <mask> } <mask> <mask> u.workDir = wd <mask> u.confName = filepath.Join(u.workDir, "AdGuardHome.yaml") <mask> u.newVersion = "v0.103.1" <mask> u.packageURL = fakeURL.String() <mask> <mask> require.NoError(t, u.prepare("AdGuardHome")) <mask> </s> Pull request: 4219-updater-1 Merge in DNS/adguard-home from 4219-updater-1 to master Squashed commit of the following: commit 5721a0032150c9a0b8bd940542860c262adfe646 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 14:50:56 2022 +0300 updater: imp code commit a18ccb2174af3d68c85e40aed5167c01523b0e67 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 13:49:23 2022 +0300 updater: exe name commit deb5c7bee63a3b5eb7aa722268857ebcfc7f053d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 10:05:00 2022 +0300 updater: exe name </s> remove u.confName = filepath.Join(u.workDir, "AdGuardHome.yaml") </s> add u.confName = yamlPath </s> remove require.NoError(t, u.prepare("AdGuardHome")) u.currentExeName = filepath.Join(wd, "AdGuardHome") </s> add require.NoError(t, u.prepare(exePath)) </s> remove require.NoError(t, u.prepare("AdGuardHome.exe")) u.currentExeName = filepath.Join(wd, "AdGuardHome.exe") </s> add require.NoError(t, u.prepare(exePath)) </s> remove u.currentExeName = filepath.Join(u.workDir, exeName) </s> add u.currentExeName = exePath </s> remove d, err = os.ReadFile(filepath.Join(wd, "README.md")) </s> add d, err = os.ReadFile(readmePath)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c098960b399be1240e0f34de5a888fea427cbc52
internal/updater/updater_test.go
require.NoError(t, u.prepare(exePath))
<mask> u.confName = filepath.Join(u.workDir, "AdGuardHome.yaml") <mask> u.newVersion = "v0.103.1" <mask> u.packageURL = fakeURL.String() <mask> <mask> require.NoError(t, u.prepare("AdGuardHome")) <mask> <mask> u.currentExeName = filepath.Join(wd, "AdGuardHome") <mask> <mask> require.NoError(t, u.downloadPackageFile(u.packageURL, u.packageName)) <mask> require.NoError(t, u.unpack()) <mask> <mask> // require.NoError(t, u.check()) <mask> require.NoError(t, u.backup()) </s> Pull request: 4219-updater-1 Merge in DNS/adguard-home from 4219-updater-1 to master Squashed commit of the following: commit 5721a0032150c9a0b8bd940542860c262adfe646 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 14:50:56 2022 +0300 updater: imp code commit a18ccb2174af3d68c85e40aed5167c01523b0e67 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 13:49:23 2022 +0300 updater: exe name commit deb5c7bee63a3b5eb7aa722268857ebcfc7f053d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 10:05:00 2022 +0300 updater: exe name </s> remove require.NoError(t, u.prepare("AdGuardHome.exe")) u.currentExeName = filepath.Join(wd, "AdGuardHome.exe") </s> add require.NoError(t, u.prepare(exePath)) </s> remove u.confName = filepath.Join(u.workDir, "AdGuardHome.yaml") </s> add u.confName = yamlPath </s> remove u.confName = filepath.Join(u.workDir, "AdGuardHome.yaml") </s> add u.confName = yamlPath </s> remove require.NoError(t, os.WriteFile(filepath.Join(wd, "AdGuardHome"), []byte("AdGuardHome"), 0o755)) require.NoError(t, os.WriteFile(filepath.Join(wd, "README.md"), []byte("README.md"), 0o644)) require.NoError(t, os.WriteFile(filepath.Join(wd, "LICENSE.txt"), []byte("LICENSE.txt"), 0o644)) require.NoError(t, os.WriteFile(filepath.Join(wd, "AdGuardHome.yaml"), []byte("AdGuardHome.yaml"), 0o644)) </s> add exePath := filepath.Join(wd, "AdGuardHome") yamlPath := filepath.Join(wd, "AdGuardHome.yaml") readmePath := filepath.Join(wd, "README.md") licensePath := filepath.Join(wd, "LICENSE.txt") require.NoError(t, os.WriteFile(exePath, []byte("AdGuardHome"), 0o755)) require.NoError(t, os.WriteFile(yamlPath, []byte("AdGuardHome.yaml"), 0o644)) require.NoError(t, os.WriteFile(readmePath, []byte("README.md"), 0o644)) require.NoError(t, os.WriteFile(licensePath, []byte("LICENSE.txt"), 0o644)) </s> remove d, err = os.ReadFile(filepath.Join(wd, "README.md")) </s> add d, err = os.ReadFile(readmePath)
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c098960b399be1240e0f34de5a888fea427cbc52
internal/updater/updater_test.go
d, err = os.ReadFile(exePath)
<mask> <mask> assert.Equal(t, "AdGuardHome", string(d)) <mask> <mask> // check updated files <mask> d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome")) <mask> require.NoError(t, err) <mask> <mask> assert.Equal(t, "1", string(d)) <mask> <mask> d, err = os.ReadFile(filepath.Join(wd, "README.md")) </s> Pull request: 4219-updater-1 Merge in DNS/adguard-home from 4219-updater-1 to master Squashed commit of the following: commit 5721a0032150c9a0b8bd940542860c262adfe646 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 14:50:56 2022 +0300 updater: imp code commit a18ccb2174af3d68c85e40aed5167c01523b0e67 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 13:49:23 2022 +0300 updater: exe name commit deb5c7bee63a3b5eb7aa722268857ebcfc7f053d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 10:05:00 2022 +0300 updater: exe name </s> remove d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome.exe")) </s> add d, err = os.ReadFile(exePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "README.md")) </s> add d, err = os.ReadFile(readmePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "README.md")) </s> add d, err = os.ReadFile(readmePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "LICENSE.txt")) </s> add d, err = os.ReadFile(licensePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "LICENSE.txt")) </s> add d, err = os.ReadFile(licensePath)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c098960b399be1240e0f34de5a888fea427cbc52
internal/updater/updater_test.go
d, err = os.ReadFile(readmePath)
<mask> require.NoError(t, err) <mask> <mask> assert.Equal(t, "1", string(d)) <mask> <mask> d, err = os.ReadFile(filepath.Join(wd, "README.md")) <mask> require.NoError(t, err) <mask> <mask> assert.Equal(t, "2", string(d)) <mask> <mask> d, err = os.ReadFile(filepath.Join(wd, "LICENSE.txt")) </s> Pull request: 4219-updater-1 Merge in DNS/adguard-home from 4219-updater-1 to master Squashed commit of the following: commit 5721a0032150c9a0b8bd940542860c262adfe646 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 14:50:56 2022 +0300 updater: imp code commit a18ccb2174af3d68c85e40aed5167c01523b0e67 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 13:49:23 2022 +0300 updater: exe name commit deb5c7bee63a3b5eb7aa722268857ebcfc7f053d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 10:05:00 2022 +0300 updater: exe name </s> remove d, err = os.ReadFile(filepath.Join(wd, "README.md")) </s> add d, err = os.ReadFile(readmePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "LICENSE.txt")) </s> add d, err = os.ReadFile(licensePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "LICENSE.txt")) </s> add d, err = os.ReadFile(licensePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome.exe")) </s> add d, err = os.ReadFile(exePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome")) </s> add d, err = os.ReadFile(exePath)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c098960b399be1240e0f34de5a888fea427cbc52
internal/updater/updater_test.go
d, err = os.ReadFile(licensePath)
<mask> require.NoError(t, err) <mask> <mask> assert.Equal(t, "2", string(d)) <mask> <mask> d, err = os.ReadFile(filepath.Join(wd, "LICENSE.txt")) <mask> require.NoError(t, err) <mask> <mask> assert.Equal(t, "3", string(d)) <mask> <mask> d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome.yaml")) </s> Pull request: 4219-updater-1 Merge in DNS/adguard-home from 4219-updater-1 to master Squashed commit of the following: commit 5721a0032150c9a0b8bd940542860c262adfe646 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 14:50:56 2022 +0300 updater: imp code commit a18ccb2174af3d68c85e40aed5167c01523b0e67 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 13:49:23 2022 +0300 updater: exe name commit deb5c7bee63a3b5eb7aa722268857ebcfc7f053d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 10:05:00 2022 +0300 updater: exe name </s> remove d, err = os.ReadFile(filepath.Join(wd, "LICENSE.txt")) </s> add d, err = os.ReadFile(licensePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "README.md")) </s> add d, err = os.ReadFile(readmePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "README.md")) </s> add d, err = os.ReadFile(readmePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome.yaml")) </s> add d, err = os.ReadFile(yamlPath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome.yaml")) </s> add d, err = os.ReadFile(yamlPath)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c098960b399be1240e0f34de5a888fea427cbc52
internal/updater/updater_test.go
d, err = os.ReadFile(yamlPath)
<mask> require.NoError(t, err) <mask> <mask> assert.Equal(t, "3", string(d)) <mask> <mask> d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome.yaml")) <mask> require.NoError(t, err) <mask> <mask> assert.Equal(t, "AdGuardHome.yaml", string(d)) <mask> } <mask> </s> Pull request: 4219-updater-1 Merge in DNS/adguard-home from 4219-updater-1 to master Squashed commit of the following: commit 5721a0032150c9a0b8bd940542860c262adfe646 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 14:50:56 2022 +0300 updater: imp code commit a18ccb2174af3d68c85e40aed5167c01523b0e67 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 13:49:23 2022 +0300 updater: exe name commit deb5c7bee63a3b5eb7aa722268857ebcfc7f053d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 10:05:00 2022 +0300 updater: exe name </s> remove d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome.yaml")) </s> add d, err = os.ReadFile(yamlPath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "LICENSE.txt")) </s> add d, err = os.ReadFile(licensePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "LICENSE.txt")) </s> add d, err = os.ReadFile(licensePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "README.md")) </s> add d, err = os.ReadFile(readmePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "README.md")) </s> add d, err = os.ReadFile(readmePath)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c098960b399be1240e0f34de5a888fea427cbc52
internal/updater/updater_test.go
exePath := filepath.Join(wd, "AdGuardHome.exe") yamlPath := filepath.Join(wd, "AdGuardHome.yaml") readmePath := filepath.Join(wd, "README.md") licensePath := filepath.Join(wd, "LICENSE.txt") require.NoError(t, os.WriteFile(exePath, []byte("AdGuardHome.exe"), 0o755)) require.NoError(t, os.WriteFile(yamlPath, []byte("AdGuardHome.yaml"), 0o644)) require.NoError(t, os.WriteFile(readmePath, []byte("README.md"), 0o644)) require.NoError(t, os.WriteFile(licensePath, []byte("LICENSE.txt"), 0o644))
<mask> <mask> func TestUpdateWindows(t *testing.T) { <mask> wd := t.TempDir() <mask> <mask> require.NoError(t, os.WriteFile(filepath.Join(wd, "AdGuardHome.exe"), []byte("AdGuardHome.exe"), 0o755)) <mask> require.NoError(t, os.WriteFile(filepath.Join(wd, "README.md"), []byte("README.md"), 0o644)) <mask> require.NoError(t, os.WriteFile(filepath.Join(wd, "LICENSE.txt"), []byte("LICENSE.txt"), 0o644)) <mask> require.NoError(t, os.WriteFile(filepath.Join(wd, "AdGuardHome.yaml"), []byte("AdGuardHome.yaml"), 0o644)) <mask> <mask> // start server for returning package file <mask> pkgData, err := os.ReadFile("testdata/AdGuardHome.zip") <mask> require.NoError(t, err) <mask> </s> Pull request: 4219-updater-1 Merge in DNS/adguard-home from 4219-updater-1 to master Squashed commit of the following: commit 5721a0032150c9a0b8bd940542860c262adfe646 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 14:50:56 2022 +0300 updater: imp code commit a18ccb2174af3d68c85e40aed5167c01523b0e67 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 13:49:23 2022 +0300 updater: exe name commit deb5c7bee63a3b5eb7aa722268857ebcfc7f053d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 10:05:00 2022 +0300 updater: exe name </s> remove require.NoError(t, os.WriteFile(filepath.Join(wd, "AdGuardHome"), []byte("AdGuardHome"), 0o755)) require.NoError(t, os.WriteFile(filepath.Join(wd, "README.md"), []byte("README.md"), 0o644)) require.NoError(t, os.WriteFile(filepath.Join(wd, "LICENSE.txt"), []byte("LICENSE.txt"), 0o644)) require.NoError(t, os.WriteFile(filepath.Join(wd, "AdGuardHome.yaml"), []byte("AdGuardHome.yaml"), 0o644)) </s> add exePath := filepath.Join(wd, "AdGuardHome") yamlPath := filepath.Join(wd, "AdGuardHome.yaml") readmePath := filepath.Join(wd, "README.md") licensePath := filepath.Join(wd, "LICENSE.txt") require.NoError(t, os.WriteFile(exePath, []byte("AdGuardHome"), 0o755)) require.NoError(t, os.WriteFile(yamlPath, []byte("AdGuardHome.yaml"), 0o644)) require.NoError(t, os.WriteFile(readmePath, []byte("README.md"), 0o644)) require.NoError(t, os.WriteFile(licensePath, []byte("LICENSE.txt"), 0o644)) </s> remove func (u *Updater) prepare(exeName string) (err error) { </s> add func (u *Updater) prepare(exePath string) (err error) { </s> remove d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome.yaml")) </s> add d, err = os.ReadFile(yamlPath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome.yaml")) </s> add d, err = os.ReadFile(yamlPath) </s> remove require.NoError(t, u.prepare("AdGuardHome")) u.currentExeName = filepath.Join(wd, "AdGuardHome") </s> add require.NoError(t, u.prepare(exePath))
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c098960b399be1240e0f34de5a888fea427cbc52
internal/updater/updater_test.go
u.confName = yamlPath
<mask> Path: "AdGuardHome.zip", <mask> } <mask> <mask> u.workDir = wd <mask> u.confName = filepath.Join(u.workDir, "AdGuardHome.yaml") <mask> u.newVersion = "v0.103.1" <mask> u.packageURL = fakeURL.String() <mask> <mask> require.NoError(t, u.prepare("AdGuardHome.exe")) <mask> </s> Pull request: 4219-updater-1 Merge in DNS/adguard-home from 4219-updater-1 to master Squashed commit of the following: commit 5721a0032150c9a0b8bd940542860c262adfe646 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 14:50:56 2022 +0300 updater: imp code commit a18ccb2174af3d68c85e40aed5167c01523b0e67 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 13:49:23 2022 +0300 updater: exe name commit deb5c7bee63a3b5eb7aa722268857ebcfc7f053d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 10:05:00 2022 +0300 updater: exe name </s> remove u.confName = filepath.Join(u.workDir, "AdGuardHome.yaml") </s> add u.confName = yamlPath </s> remove require.NoError(t, u.prepare("AdGuardHome.exe")) u.currentExeName = filepath.Join(wd, "AdGuardHome.exe") </s> add require.NoError(t, u.prepare(exePath)) </s> remove require.NoError(t, u.prepare("AdGuardHome")) u.currentExeName = filepath.Join(wd, "AdGuardHome") </s> add require.NoError(t, u.prepare(exePath)) </s> remove u.currentExeName = filepath.Join(u.workDir, exeName) </s> add u.currentExeName = exePath </s> remove d, err = os.ReadFile(filepath.Join(wd, "README.md")) </s> add d, err = os.ReadFile(readmePath)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c098960b399be1240e0f34de5a888fea427cbc52
internal/updater/updater_test.go
require.NoError(t, u.prepare(exePath))
<mask> u.confName = filepath.Join(u.workDir, "AdGuardHome.yaml") <mask> u.newVersion = "v0.103.1" <mask> u.packageURL = fakeURL.String() <mask> <mask> require.NoError(t, u.prepare("AdGuardHome.exe")) <mask> <mask> u.currentExeName = filepath.Join(wd, "AdGuardHome.exe") <mask> <mask> require.NoError(t, u.downloadPackageFile(u.packageURL, u.packageName)) <mask> require.NoError(t, u.unpack()) <mask> // assert.Nil(t, u.check()) <mask> require.NoError(t, u.backup()) <mask> require.NoError(t, u.replace()) </s> Pull request: 4219-updater-1 Merge in DNS/adguard-home from 4219-updater-1 to master Squashed commit of the following: commit 5721a0032150c9a0b8bd940542860c262adfe646 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 14:50:56 2022 +0300 updater: imp code commit a18ccb2174af3d68c85e40aed5167c01523b0e67 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 13:49:23 2022 +0300 updater: exe name commit deb5c7bee63a3b5eb7aa722268857ebcfc7f053d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 10:05:00 2022 +0300 updater: exe name </s> remove require.NoError(t, u.prepare("AdGuardHome")) u.currentExeName = filepath.Join(wd, "AdGuardHome") </s> add require.NoError(t, u.prepare(exePath)) </s> remove u.confName = filepath.Join(u.workDir, "AdGuardHome.yaml") </s> add u.confName = yamlPath </s> remove u.confName = filepath.Join(u.workDir, "AdGuardHome.yaml") </s> add u.confName = yamlPath </s> remove require.NoError(t, os.WriteFile(filepath.Join(wd, "AdGuardHome.exe"), []byte("AdGuardHome.exe"), 0o755)) require.NoError(t, os.WriteFile(filepath.Join(wd, "README.md"), []byte("README.md"), 0o644)) require.NoError(t, os.WriteFile(filepath.Join(wd, "LICENSE.txt"), []byte("LICENSE.txt"), 0o644)) require.NoError(t, os.WriteFile(filepath.Join(wd, "AdGuardHome.yaml"), []byte("AdGuardHome.yaml"), 0o644)) </s> add exePath := filepath.Join(wd, "AdGuardHome.exe") yamlPath := filepath.Join(wd, "AdGuardHome.yaml") readmePath := filepath.Join(wd, "README.md") licensePath := filepath.Join(wd, "LICENSE.txt") require.NoError(t, os.WriteFile(exePath, []byte("AdGuardHome.exe"), 0o755)) require.NoError(t, os.WriteFile(yamlPath, []byte("AdGuardHome.yaml"), 0o644)) require.NoError(t, os.WriteFile(readmePath, []byte("README.md"), 0o644)) require.NoError(t, os.WriteFile(licensePath, []byte("LICENSE.txt"), 0o644)) </s> remove d, err = os.ReadFile(filepath.Join(wd, "README.md")) </s> add d, err = os.ReadFile(readmePath)
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c098960b399be1240e0f34de5a888fea427cbc52
internal/updater/updater_test.go
d, err = os.ReadFile(exePath)
<mask> <mask> assert.Equal(t, "AdGuardHome.exe", string(d)) <mask> <mask> // check updated files <mask> d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome.exe")) <mask> require.NoError(t, err) <mask> <mask> assert.Equal(t, "1", string(d)) <mask> <mask> d, err = os.ReadFile(filepath.Join(wd, "README.md")) </s> Pull request: 4219-updater-1 Merge in DNS/adguard-home from 4219-updater-1 to master Squashed commit of the following: commit 5721a0032150c9a0b8bd940542860c262adfe646 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 14:50:56 2022 +0300 updater: imp code commit a18ccb2174af3d68c85e40aed5167c01523b0e67 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 13:49:23 2022 +0300 updater: exe name commit deb5c7bee63a3b5eb7aa722268857ebcfc7f053d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 10:05:00 2022 +0300 updater: exe name </s> remove d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome")) </s> add d, err = os.ReadFile(exePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "README.md")) </s> add d, err = os.ReadFile(readmePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "README.md")) </s> add d, err = os.ReadFile(readmePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "LICENSE.txt")) </s> add d, err = os.ReadFile(licensePath) </s> remove d, err = os.ReadFile(filepath.Join(wd, "LICENSE.txt")) </s> add d, err = os.ReadFile(licensePath)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c098960b399be1240e0f34de5a888fea427cbc52
internal/updater/updater_test.go
d, err = os.ReadFile(readmePath)
<mask> require.NoError(t, err) <mask> <mask> assert.Equal(t, "1", string(d)) <mask> <mask> d, err = os.ReadFile(filepath.Join(wd, "README.md")) <mask> require.NoError(t, err) <mask> <mask> assert.Equal(t, "2", string(d)) <mask> <mask> d, err = os.ReadFile(filepath.Join(wd, "LICENSE.txt")) </s> Pull request: 4219-updater-1 Merge in DNS/adguard-home from 4219-updater-1 to master Squashed commit of the following: commit 5721a0032150c9a0b8bd940542860c262adfe646 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 14:50:56 2022 +0300 updater: imp code commit a18ccb2174af3d68c85e40aed5167c01523b0e67 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 13:49:23 2022 +0300 updater: exe name commit deb5c7bee63a3b5eb7aa722268857ebcfc7f053d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 10:05:00 2022 +0300 updater: exe name
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c098960b399be1240e0f34de5a888fea427cbc52
internal/updater/updater_test.go
d, err = os.ReadFile(licensePath)
<mask> require.NoError(t, err) <mask> <mask> assert.Equal(t, "2", string(d)) <mask> <mask> d, err = os.ReadFile(filepath.Join(wd, "LICENSE.txt")) <mask> require.NoError(t, err) <mask> <mask> assert.Equal(t, "3", string(d)) <mask> <mask> d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome.yaml")) </s> Pull request: 4219-updater-1 Merge in DNS/adguard-home from 4219-updater-1 to master Squashed commit of the following: commit 5721a0032150c9a0b8bd940542860c262adfe646 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 14:50:56 2022 +0300 updater: imp code commit a18ccb2174af3d68c85e40aed5167c01523b0e67 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 13:49:23 2022 +0300 updater: exe name commit deb5c7bee63a3b5eb7aa722268857ebcfc7f053d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 10:05:00 2022 +0300 updater: exe name
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c098960b399be1240e0f34de5a888fea427cbc52
internal/updater/updater_test.go
d, err = os.ReadFile(yamlPath)
<mask> require.NoError(t, err) <mask> <mask> assert.Equal(t, "3", string(d)) <mask> <mask> d, err = os.ReadFile(filepath.Join(wd, "AdGuardHome.yaml")) <mask> require.NoError(t, err) <mask> <mask> assert.Equal(t, "AdGuardHome.yaml", string(d)) <mask> } <mask> </s> Pull request: 4219-updater-1 Merge in DNS/adguard-home from 4219-updater-1 to master Squashed commit of the following: commit 5721a0032150c9a0b8bd940542860c262adfe646 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 14:50:56 2022 +0300 updater: imp code commit a18ccb2174af3d68c85e40aed5167c01523b0e67 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 13:49:23 2022 +0300 updater: exe name commit deb5c7bee63a3b5eb7aa722268857ebcfc7f053d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Wed Aug 31 10:05:00 2022 +0300 updater: exe name
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c098960b399be1240e0f34de5a888fea427cbc52
internal/updater/updater_test.go
// This use of ReadAll is safe, because request's body is now limited.
<mask> // . Search for another DHCP server running <mask> // . Check if a static IP is configured for the network interface <mask> // Respond with results <mask> func (s *Server) handleDHCPFindActiveServer(w http.ResponseWriter, r *http.Request) { <mask> body, err := ioutil.ReadAll(r.Body) <mask> if err != nil { <mask> msg := fmt.Sprintf("failed to read request body: %s", err) <mask> log.Error(msg) </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove body, err := ioutil.ReadAll(r.Body) if err != nil { httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add </s> remove body, err := ioutil.ReadAll(r.Body) </s> add cj := clientJSON{} err := json.NewDecoder(r.Body).Decode(&cj) </s> remove body, err := ioutil.ReadAll(r.Body) </s> add dj := updateJSON{} err := json.NewDecoder(r.Body).Decode(&dj) </s> remove httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err)
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/dhcpd/dhcphttp.go
"github.com/AdguardTeam/AdGuardHome/internal/aghio"
<mask> "os" <mask> "time" <mask> "unsafe" <mask> <mask> "github.com/AdguardTeam/golibs/log" <mask> ) <mask> <mask> // GLMode - enable GL-Inet compatibility mode </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove const glTokenTimeoutSeconds = 3600 const glCookieName = "Admin-Token" </s> add const ( glTokenTimeoutSeconds = 3600 glCookieName = "Admin-Token" )
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/auth_glinet.go
const ( glTokenTimeoutSeconds = 3600 glCookieName = "Admin-Token" )
<mask> var GLMode bool <mask> <mask> var glFilePrefix = "/tmp/gl_token_" <mask> <mask> const glTokenTimeoutSeconds = 3600 <mask> const glCookieName = "Admin-Token" <mask> <mask> func glProcessRedirect(w http.ResponseWriter, r *http.Request) bool { <mask> if !GLMode { <mask> return false <mask> } </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err) </s> remove var dj updateJSON err = json.Unmarshal(body, &dj) if err != nil { httpError(w, http.StatusBadRequest, "JSON parse: %s", err) </s> add </s> remove body, err := ioutil.ReadAll(r.Body) if err != nil { httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/auth_glinet.go
// MaxFileSize is a maximum file length in bytes. const MaxFileSize = 1024 * 1024
<mask> } <mask> <mask> func glGetTokenDate(file string) uint32 { <mask> f, err := os.Open(file) <mask> if err != nil { <mask> log.Error("os.Open: %s", err) <mask> return 0 </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove bs, err := ioutil.ReadAll(f) </s> add // This use of ReadAll is now safe, because we limited reader. bs, err := ioutil.ReadAll(fileReadCloser) </s> remove cj := clientJSON{} err = json.Unmarshal(body, &cj) if err != nil || len(cj.Name) == 0 { httpError(w, http.StatusBadRequest, "JSON parse: %s", err) </s> add if len(cj.Name) == 0 { httpError(w, http.StatusBadRequest, "client's name must be non-empty") </s> remove if resp != nil && resp.Body != nil { defer resp.Body.Close() </s> add defer resp.Body.Close() resp.Body, err = aghio.LimitReadCloser(resp.Body, MaxPackageFileSize) if err != nil { return fmt.Errorf("http request failed: %w", err) </s> remove var dj updateJSON err = json.Unmarshal(body, &dj) if err != nil { httpError(w, http.StatusBadRequest, "JSON parse: %s", err) </s> add
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/auth_glinet.go
defer f.Close() fileReadCloser, err := aghio.LimitReadCloser(f, MaxFileSize) if err != nil { log.Error("LimitReadCloser: %s", err) return 0 } defer fileReadCloser.Close()
<mask> if err != nil { <mask> log.Error("os.Open: %s", err) <mask> return 0 <mask> } <mask> var dateToken uint32 <mask> <mask> // This use of ReadAll is now safe, because we limited reader. <mask> bs, err := ioutil.ReadAll(fileReadCloser) <mask> if err != nil { </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove bs, err := ioutil.ReadAll(f) </s> add // This use of ReadAll is now safe, because we limited reader. bs, err := ioutil.ReadAll(fileReadCloser) </s> remove data, err := ioutil.ReadAll(conn) </s> add // This use of ReadAll is now safe, because we limited the conn Reader. data, err := ioutil.ReadAll(connReadCloser)
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/auth_glinet.go
// This use of ReadAll is now safe, because we limited reader. bs, err := ioutil.ReadAll(fileReadCloser)
<mask> log.Error("os.Open: %s", err) <mask> return 0 <mask> } <mask> var dateToken uint32 <mask> bs, err := ioutil.ReadAll(f) <mask> if err != nil { <mask> log.Error("ioutil.ReadAll: %s", err) <mask> return 0 <mask> } <mask> buf := bytes.NewBuffer(bs) </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove var dj updateJSON err = json.Unmarshal(body, &dj) if err != nil { httpError(w, http.StatusBadRequest, "JSON parse: %s", err) </s> add </s> remove cj := clientJSON{} err = json.Unmarshal(body, &cj) if err != nil || len(cj.Name) == 0 { httpError(w, http.StatusBadRequest, "JSON parse: %s", err) </s> add if len(cj.Name) == 0 { httpError(w, http.StatusBadRequest, "client's name must be non-empty") </s> remove err = json.Unmarshal(body, &cj) </s> add err := json.NewDecoder(r.Body).Decode(&cj)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/auth_glinet.go
<mask> <mask> import ( <mask> "encoding/json" <mask> "fmt" <mask> "io/ioutil" <mask> "net/http" <mask> ) <mask> <mask> type clientJSON struct { <mask> IDs []string `json:"ids"` </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove const glTokenTimeoutSeconds = 3600 const glCookieName = "Admin-Token" </s> add const ( glTokenTimeoutSeconds = 3600 glCookieName = "Admin-Token" ) </s> remove "strings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/clients_http.go
<mask> } <mask> <mask> // Add a new client <mask> func (clients *clientsContainer) handleAddClient(w http.ResponseWriter, r *http.Request) { <mask> body, err := ioutil.ReadAll(r.Body) <mask> if err != nil { <mask> httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) <mask> return <mask> } <mask> <mask> cj := clientJSON{} <mask> err = json.Unmarshal(body, &cj) <mask> if err != nil { <mask> httpError(w, http.StatusBadRequest, "JSON parse: %s", err) <mask> return </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err) </s> remove body, err := ioutil.ReadAll(r.Body) </s> add cj := clientJSON{} err := json.NewDecoder(r.Body).Decode(&cj) </s> remove httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err) </s> remove httpError(w, http.StatusBadRequest, "JSON parse: %s", err) </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err) </s> remove err = json.Unmarshal(body, &cj) </s> add err := json.NewDecoder(r.Body).Decode(&cj)
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/clients_http.go
err := json.NewDecoder(r.Body).Decode(&cj)
<mask> return <mask> } <mask> <mask> cj := clientJSON{} <mask> err = json.Unmarshal(body, &cj) <mask> if err != nil { <mask> httpError(w, http.StatusBadRequest, "JSON parse: %s", err) <mask> return <mask> } <mask> </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove httpError(w, http.StatusBadRequest, "JSON parse: %s", err) </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err) </s> remove body, err := ioutil.ReadAll(r.Body) if err != nil { httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add </s> remove cj := clientJSON{} err = json.Unmarshal(body, &cj) if err != nil || len(cj.Name) == 0 { httpError(w, http.StatusBadRequest, "JSON parse: %s", err) </s> add if len(cj.Name) == 0 { httpError(w, http.StatusBadRequest, "client's name must be non-empty") </s> remove var dj updateJSON err = json.Unmarshal(body, &dj) if err != nil { httpError(w, http.StatusBadRequest, "JSON parse: %s", err) </s> add </s> remove httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/clients_http.go
httpError(w, http.StatusBadRequest, "failed to process request body: %s", err)
<mask> <mask> cj := clientJSON{} <mask> err = json.Unmarshal(body, &cj) <mask> if err != nil { <mask> httpError(w, http.StatusBadRequest, "JSON parse: %s", err) <mask> return <mask> } <mask> <mask> c, err := jsonToClient(cj) <mask> if err != nil { </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove err = json.Unmarshal(body, &cj) </s> add err := json.NewDecoder(r.Body).Decode(&cj) </s> remove body, err := ioutil.ReadAll(r.Body) if err != nil { httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add </s> remove cj := clientJSON{} err = json.Unmarshal(body, &cj) if err != nil || len(cj.Name) == 0 { httpError(w, http.StatusBadRequest, "JSON parse: %s", err) </s> add if len(cj.Name) == 0 { httpError(w, http.StatusBadRequest, "client's name must be non-empty") </s> remove httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err) </s> remove httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/clients_http.go
cj := clientJSON{} err := json.NewDecoder(r.Body).Decode(&cj)
<mask> } <mask> <mask> // Remove client <mask> func (clients *clientsContainer) handleDelClient(w http.ResponseWriter, r *http.Request) { <mask> body, err := ioutil.ReadAll(r.Body) <mask> if err != nil { <mask> httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) <mask> return <mask> } <mask> </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err) </s> remove body, err := ioutil.ReadAll(r.Body) if err != nil { httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add </s> remove body, err := ioutil.ReadAll(r.Body) </s> add dj := updateJSON{} err := json.NewDecoder(r.Body).Decode(&dj) </s> remove httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/clients_http.go
httpError(w, http.StatusBadRequest, "failed to process request body: %s", err)
<mask> // Remove client <mask> func (clients *clientsContainer) handleDelClient(w http.ResponseWriter, r *http.Request) { <mask> body, err := ioutil.ReadAll(r.Body) <mask> if err != nil { <mask> httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) <mask> return <mask> } <mask> <mask> cj := clientJSON{} <mask> err = json.Unmarshal(body, &cj) </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove body, err := ioutil.ReadAll(r.Body) </s> add cj := clientJSON{} err := json.NewDecoder(r.Body).Decode(&cj) </s> remove body, err := ioutil.ReadAll(r.Body) if err != nil { httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add </s> remove httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err) </s> remove body, err := ioutil.ReadAll(r.Body) </s> add dj := updateJSON{} err := json.NewDecoder(r.Body).Decode(&dj) </s> remove httpError(w, http.StatusBadRequest, "JSON parse: %s", err) </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/clients_http.go
if len(cj.Name) == 0 { httpError(w, http.StatusBadRequest, "client's name must be non-empty")
<mask> httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) <mask> return <mask> } <mask> <mask> cj := clientJSON{} <mask> err = json.Unmarshal(body, &cj) <mask> if err != nil || len(cj.Name) == 0 { <mask> httpError(w, http.StatusBadRequest, "JSON parse: %s", err) <mask> return <mask> } <mask> <mask> if !clients.Del(cj.Name) { <mask> httpError(w, http.StatusBadRequest, "Client not found") </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove httpError(w, http.StatusBadRequest, "JSON parse: %s", err) </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err) </s> remove var dj updateJSON err = json.Unmarshal(body, &dj) if err != nil { httpError(w, http.StatusBadRequest, "JSON parse: %s", err) </s> add </s> remove body, err := ioutil.ReadAll(r.Body) if err != nil { httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add </s> remove err = json.Unmarshal(body, &cj) </s> add err := json.NewDecoder(r.Body).Decode(&cj) </s> remove httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err)
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/clients_http.go
dj := updateJSON{} err := json.NewDecoder(r.Body).Decode(&dj)
<mask> } <mask> <mask> // Update client's properties <mask> func (clients *clientsContainer) handleUpdateClient(w http.ResponseWriter, r *http.Request) { <mask> body, err := ioutil.ReadAll(r.Body) <mask> if err != nil { <mask> httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) <mask> return <mask> } <mask> </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err) </s> remove body, err := ioutil.ReadAll(r.Body) </s> add cj := clientJSON{} err := json.NewDecoder(r.Body).Decode(&cj) </s> remove httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err) </s> remove body, err := ioutil.ReadAll(r.Body) if err != nil { httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/clients_http.go
httpError(w, http.StatusBadRequest, "failed to process request body: %s", err)
<mask> // Update client's properties <mask> func (clients *clientsContainer) handleUpdateClient(w http.ResponseWriter, r *http.Request) { <mask> body, err := ioutil.ReadAll(r.Body) <mask> if err != nil { <mask> httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) <mask> return <mask> } <mask> <mask> var dj updateJSON <mask> err = json.Unmarshal(body, &dj) <mask> if err != nil { <mask> httpError(w, http.StatusBadRequest, "JSON parse: %s", err) </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove body, err := ioutil.ReadAll(r.Body) </s> add dj := updateJSON{} err := json.NewDecoder(r.Body).Decode(&dj) </s> remove var dj updateJSON err = json.Unmarshal(body, &dj) if err != nil { httpError(w, http.StatusBadRequest, "JSON parse: %s", err) </s> add </s> remove body, err := ioutil.ReadAll(r.Body) if err != nil { httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add </s> remove httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err) </s> remove body, err := ioutil.ReadAll(r.Body) </s> add cj := clientJSON{} err := json.NewDecoder(r.Body).Decode(&cj)
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/clients_http.go
<mask> httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) <mask> return <mask> } <mask> <mask> var dj updateJSON <mask> err = json.Unmarshal(body, &dj) <mask> if err != nil { <mask> httpError(w, http.StatusBadRequest, "JSON parse: %s", err) <mask> return <mask> } <mask> if len(dj.Name) == 0 { <mask> httpError(w, http.StatusBadRequest, "Invalid request") <mask> return </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err) </s> remove cj := clientJSON{} err = json.Unmarshal(body, &cj) if err != nil || len(cj.Name) == 0 { httpError(w, http.StatusBadRequest, "JSON parse: %s", err) </s> add if len(cj.Name) == 0 { httpError(w, http.StatusBadRequest, "client's name must be non-empty") </s> remove httpError(w, http.StatusBadRequest, "JSON parse: %s", err) </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err) </s> remove body, err := ioutil.ReadAll(r.Body) if err != nil { httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add </s> remove err = json.Unmarshal(body, &cj) </s> add err := json.NewDecoder(r.Body).Decode(&cj)
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/clients_http.go
// This use of ReadAll is safe, because request's body is now limited.
<mask> } <mask> } <mask> <mask> func (f *Filtering) handleFilteringSetRules(w http.ResponseWriter, r *http.Request) { <mask> body, err := ioutil.ReadAll(r.Body) <mask> if err != nil { <mask> httpError(w, http.StatusBadRequest, "Failed to read request body: %s", err) <mask> return <mask> } <mask> </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove body, err := ioutil.ReadAll(r.Body) </s> add cj := clientJSON{} err := json.NewDecoder(r.Body).Decode(&cj) </s> remove body, err := ioutil.ReadAll(r.Body) if err != nil { httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add </s> remove body, err := ioutil.ReadAll(r.Body) </s> add dj := updateJSON{} err := json.NewDecoder(r.Body).Decode(&dj) </s> remove httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err) </s> remove httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err)
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/control_filtering.go
// This use of ReadAll is safe, because request's body is now limited.
<mask> } <mask> <mask> func handleI18nChangeLanguage(w http.ResponseWriter, r *http.Request) { <mask> body, err := ioutil.ReadAll(r.Body) <mask> if err != nil { <mask> msg := fmt.Sprintf("failed to read request body: %s", err) <mask> log.Println(msg) <mask> http.Error(w, msg, http.StatusBadRequest) </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove body, err := ioutil.ReadAll(r.Body) </s> add cj := clientJSON{} err := json.NewDecoder(r.Body).Decode(&cj) </s> remove body, err := ioutil.ReadAll(r.Body) </s> add dj := updateJSON{} err := json.NewDecoder(r.Body).Decode(&dj) </s> remove body, err := ioutil.ReadAll(r.Body) if err != nil { httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) return } </s> add </s> remove httpError(w, http.StatusBadRequest, "failed to read request body: %s", err) </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err)
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/i18n.go
<mask> golog "log" <mask> "net" <mask> "net/http" <mask> "strconv" <mask> "strings" <mask> "sync" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/util" <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/NYTimes/gziphandler" </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove "io/ioutil" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/web.go
Handler: withMiddlewares(http.DefaultServeMux, filterPProf, limitRequestBody),
<mask> address := net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.BindPort)) <mask> web.httpServer = &http.Server{ <mask> ErrorLog: web.errLogger, <mask> Addr: address, <mask> Handler: filterPPROF(http.DefaultServeMux), <mask> } <mask> err := web.httpServer.ListenAndServe() <mask> if err != http.ErrServerClosed { <mask> cleanupAlways() <mask> log.Fatal(err) </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove if resp != nil && resp.Body != nil { defer resp.Body.Close() </s> add defer resp.Body.Close() resp.Body, err = aghio.LimitReadCloser(resp.Body, MaxPackageFileSize) if err != nil { return fmt.Errorf("http request failed: %w", err) </s> remove err = json.Unmarshal(body, &cj) </s> add err := json.NewDecoder(r.Body).Decode(&cj) </s> remove httpError(w, http.StatusBadRequest, "JSON parse: %s", err) </s> add httpError(w, http.StatusBadRequest, "failed to process request body: %s", err) </s> remove data, err := ioutil.ReadAll(conn) </s> add // This use of ReadAll is now safe, because we limited the conn Reader. data, err := ioutil.ReadAll(connReadCloser)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/web.go
<mask> // We use ErrServerClosed as a sign that we need to rebind on new address, so go back to the start of the loop <mask> } <mask> } <mask> <mask> // TODO(a.garipov): We currently have to use this, because everything registers <mask> // its HTTP handlers in http.DefaultServeMux. In the future, refactor our HTTP <mask> // API initialization process and stop using the gosh darn http.DefaultServeMux <mask> // for anything at all. Gosh darn global variables. <mask> func filterPPROF(h http.Handler) (filtered http.Handler) { <mask> return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { <mask> if strings.HasPrefix(r.URL.Path, "/debug/pprof") { <mask> http.NotFound(w, r) <mask> <mask> return <mask> } <mask> <mask> h.ServeHTTP(w, r) <mask> }) <mask> } <mask> <mask> // Close - stop HTTP server, possibly waiting for all active connections to be closed <mask> func (web *Web) Close() { <mask> log.Info("Stopping HTTP server...") <mask> web.httpsServer.cond.L.Lock() <mask> web.httpsServer.shutdown = true </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/web.go
"github.com/AdguardTeam/AdGuardHome/internal/aghio"
<mask> "strings" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/util" <mask> <mask> "github.com/AdguardTeam/golibs/cache" <mask> "github.com/AdguardTeam/golibs/log" <mask> ) </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove "strings" </s> add </s> remove "io/ioutil" </s> add
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/whois.go
// MaxConnReadSize is an upper limit in bytes for reading from net.Conn. const MaxConnReadSize = 64 * 1024
<mask> } <mask> <mask> // Send request to a server and receive the response <mask> func (w *Whois) query(target, serverAddr string) (string, error) { <mask> addr, _, _ := net.SplitHostPort(serverAddr) <mask> if addr == "whois.arin.net" { <mask> target = "n + " + target <mask> } </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove // TODO(a.garipov): We currently have to use this, because everything registers // its HTTP handlers in http.DefaultServeMux. In the future, refactor our HTTP // API initialization process and stop using the gosh darn http.DefaultServeMux // for anything at all. Gosh darn global variables. func filterPPROF(h http.Handler) (filtered http.Handler) { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if strings.HasPrefix(r.URL.Path, "/debug/pprof") { http.NotFound(w, r) return } h.ServeHTTP(w, r) }) } </s> add
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/whois.go
connReadCloser, err := aghio.LimitReadCloser(conn, MaxConnReadSize) if err != nil { return "", err } defer connReadCloser.Close()
<mask> return "", err <mask> } <mask> defer conn.Close() <mask> <mask> _ = conn.SetReadDeadline(time.Now().Add(time.Duration(w.timeoutMsec) * time.Millisecond)) <mask> _, err = conn.Write([]byte(target + "\r\n")) <mask> if err != nil { <mask> return "", err <mask> } <mask> </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove data, err := ioutil.ReadAll(conn) </s> add // This use of ReadAll is now safe, because we limited the conn Reader. data, err := ioutil.ReadAll(connReadCloser) </s> remove if resp != nil && resp.Body != nil { defer resp.Body.Close() </s> add defer resp.Body.Close() resp.Body, err = aghio.LimitReadCloser(resp.Body, MaxPackageFileSize) if err != nil { return fmt.Errorf("http request failed: %w", err) </s> remove err = json.Unmarshal(body, &cj) </s> add err := json.NewDecoder(r.Body).Decode(&cj)
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/whois.go
// This use of ReadAll is now safe, because we limited the conn Reader. data, err := ioutil.ReadAll(connReadCloser)
<mask> if err != nil { <mask> return "", err <mask> } <mask> <mask> data, err := ioutil.ReadAll(conn) <mask> if err != nil { <mask> return "", err <mask> } <mask> <mask> return string(data), nil </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove if resp != nil && resp.Body != nil { defer resp.Body.Close() </s> add defer resp.Body.Close() resp.Body, err = aghio.LimitReadCloser(resp.Body, MaxPackageFileSize) if err != nil { return fmt.Errorf("http request failed: %w", err) </s> remove if resp != nil && resp.Body != nil { defer resp.Body.Close() </s> add if err != nil { return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err) </s> remove err = json.Unmarshal(body, &cj) </s> add err := json.NewDecoder(r.Body).Decode(&cj)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/home/whois.go
"github.com/AdguardTeam/AdGuardHome/internal/aghio"
<mask> "io/ioutil" <mask> "strings" <mask> "time" <mask> ) <mask> <mask> const versionCheckPeriod = 8 * 60 * 60 <mask> <mask> // VersionInfo - VersionInfo <mask> type VersionInfo struct { </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove "io/ioutil" </s> add
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/update/check.go
// MaxResponseSize is responses on server's requests maximum length in bytes. const MaxResponseSize = 64 * 1024
<mask> SelfUpdateMinVersion string // Min version starting with which we can auto-update <mask> CanAutoUpdate bool // If true - we can auto-update <mask> } <mask> <mask> // GetVersionResponse - downloads version.json (if needed) and deserializes it <mask> func (u *Updater) GetVersionResponse(forceRecheck bool) (VersionInfo, error) { <mask> if !forceRecheck && <mask> u.versionCheckLastTime.Unix()+versionCheckPeriod > time.Now().Unix() { <mask> return u.parseVersionResponse(u.versionJSON) <mask> } </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove // TODO(a.garipov): We currently have to use this, because everything registers // its HTTP handlers in http.DefaultServeMux. In the future, refactor our HTTP // API initialization process and stop using the gosh darn http.DefaultServeMux // for anything at all. Gosh darn global variables. func filterPPROF(h http.Handler) (filtered http.Handler) { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if strings.HasPrefix(r.URL.Path, "/debug/pprof") { http.NotFound(w, r) return } h.ServeHTTP(w, r) }) } </s> add </s> remove if resp != nil && resp.Body != nil { defer resp.Body.Close() </s> add if err != nil { return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err) </s> remove data, err := ioutil.ReadAll(conn) </s> add // This use of ReadAll is now safe, because we limited the conn Reader. data, err := ioutil.ReadAll(connReadCloser)
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/update/check.go
if err != nil { return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err)
<mask> return u.parseVersionResponse(u.versionJSON) <mask> } <mask> <mask> resp, err := u.Client.Get(u.VersionURL) <mask> if resp != nil && resp.Body != nil { <mask> defer resp.Body.Close() <mask> } <mask> <mask> if err != nil { <mask> return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err) <mask> } </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err) </s> add return VersionInfo{}, fmt.Errorf("updater: LimitReadCloser: %w", err) </s> remove if resp != nil && resp.Body != nil { defer resp.Body.Close() </s> add defer resp.Body.Close() resp.Body, err = aghio.LimitReadCloser(resp.Body, MaxPackageFileSize) if err != nil { return fmt.Errorf("http request failed: %w", err)
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/update/check.go
defer resp.Body.Close()
<mask> return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err) <mask> } <mask> <mask> resp.Body, err = aghio.LimitReadCloser(resp.Body, MaxResponseSize) <mask> if err != nil { <mask> return VersionInfo{}, fmt.Errorf("updater: LimitReadCloser: %w", err) <mask> } <mask> defer resp.Body.Close() </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err) </s> add return VersionInfo{}, fmt.Errorf("updater: LimitReadCloser: %w", err) </s> remove if resp != nil && resp.Body != nil { defer resp.Body.Close() </s> add if err != nil { return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err)
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/update/check.go
resp.Body, err = aghio.LimitReadCloser(resp.Body, MaxResponseSize)
<mask> } <mask> defer resp.Body.Close() <mask> <mask> if err != nil { <mask> return VersionInfo{}, fmt.Errorf("updater: LimitReadCloser: %w", err) <mask> } <mask> defer resp.Body.Close() </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err) </s> add return VersionInfo{}, fmt.Errorf("updater: LimitReadCloser: %w", err) </s> remove if resp != nil && resp.Body != nil { defer resp.Body.Close() </s> add if err != nil { return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err)
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/update/check.go
return VersionInfo{}, fmt.Errorf("updater: LimitReadCloser: %w", err)
<mask> defer resp.Body.Close() <mask> } <mask> <mask> if err != nil { <mask> return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err) <mask> } <mask> <mask> body, err := ioutil.ReadAll(resp.Body) <mask> if err != nil { <mask> return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err) </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove if resp != nil && resp.Body != nil { defer resp.Body.Close() </s> add if err != nil { return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err) </s> remove if resp != nil && resp.Body != nil { defer resp.Body.Close() </s> add defer resp.Body.Close() resp.Body, err = aghio.LimitReadCloser(resp.Body, MaxPackageFileSize) if err != nil { return fmt.Errorf("http request failed: %w", err)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/update/check.go
defer resp.Body.Close()
<mask> resp.Body, err = aghio.LimitReadCloser(resp.Body, MaxResponseSize) <mask> if err != nil { <mask> return VersionInfo{}, fmt.Errorf("updater: LimitReadCloser: %w", err) <mask> } <mask> <mask> // This use of ReadAll is safe, because we just limited the appropriate <mask> // ReadCloser. <mask> body, err := ioutil.ReadAll(resp.Body) </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/update/check.go
// This use of ReadAll is safe, because we just limited the appropriate // ReadCloser.
<mask> return VersionInfo{}, fmt.Errorf("updater: LimitReadCloser: %w", err) <mask> } <mask> defer resp.Body.Close() <mask> <mask> body, err := ioutil.ReadAll(resp.Body) <mask> if err != nil { <mask> return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err) <mask> } <mask> </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err) </s> add return VersionInfo{}, fmt.Errorf("updater: LimitReadCloser: %w", err) </s> remove if resp != nil && resp.Body != nil { defer resp.Body.Close() </s> add if err != nil { return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err)
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/update/check.go
"github.com/AdguardTeam/AdGuardHome/internal/aghio"
<mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/util" <mask> "github.com/AdguardTeam/golibs/log" <mask> ) <mask> </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove "strings" </s> add </s> remove "io/ioutil" </s> add
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/update/updater.go
// MaxPackageFileSize is a maximum package file length in bytes. The largest // package whose size is limited by this constant currently has the size of // approximately 9 MiB. const MaxPackageFileSize = 32 * 1024 * 1024
<mask> _ = os.RemoveAll(u.updateDir) <mask> } <mask> <mask> // Download package file and save it to disk <mask> func (u *Updater) downloadPackageFile(url string, filename string) error { <mask> resp, err := u.Client.Get(url) <mask> if err != nil { <mask> return fmt.Errorf("http request failed: %w", err) <mask> } </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove if resp != nil && resp.Body != nil { defer resp.Body.Close() </s> add defer resp.Body.Close() resp.Body, err = aghio.LimitReadCloser(resp.Body, MaxPackageFileSize) if err != nil { return fmt.Errorf("http request failed: %w", err) </s> remove if resp != nil && resp.Body != nil { defer resp.Body.Close() </s> add if err != nil { return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err)
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/update/updater.go
defer resp.Body.Close() resp.Body, err = aghio.LimitReadCloser(resp.Body, MaxPackageFileSize) if err != nil { return fmt.Errorf("http request failed: %w", err)
<mask> resp, err := u.Client.Get(url) <mask> if err != nil { <mask> return fmt.Errorf("http request failed: %w", err) <mask> } <mask> if resp != nil && resp.Body != nil { <mask> defer resp.Body.Close() <mask> } <mask> <mask> log.Debug("updater: reading HTTP body") <mask> body, err := ioutil.ReadAll(resp.Body) <mask> if err != nil { </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove if resp != nil && resp.Body != nil { defer resp.Body.Close() </s> add if err != nil { return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err) </s> remove return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err) </s> add return VersionInfo{}, fmt.Errorf("updater: LimitReadCloser: %w", err)
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/update/updater.go
defer resp.Body.Close()
<mask> return fmt.Errorf("http request failed: %w", err) <mask> } <mask> <mask> log.Debug("updater: reading HTTP body") <mask> // This use of ReadAll is now safe, because we limited body's Reader. <mask> body, err := ioutil.ReadAll(resp.Body) <mask> if err != nil { <mask> return fmt.Errorf("ioutil.ReadAll() failed: %w", err) </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove if resp != nil && resp.Body != nil { defer resp.Body.Close() </s> add defer resp.Body.Close() resp.Body, err = aghio.LimitReadCloser(resp.Body, MaxPackageFileSize) if err != nil { return fmt.Errorf("http request failed: %w", err) </s> remove data, err := ioutil.ReadAll(conn) </s> add // This use of ReadAll is now safe, because we limited the conn Reader. data, err := ioutil.ReadAll(connReadCloser)
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/update/updater.go
// This use of ReadAll is now safe, because we limited body's Reader.
<mask> <mask> log.Debug("updater: reading HTTP body") <mask> body, err := ioutil.ReadAll(resp.Body) <mask> if err != nil { <mask> return fmt.Errorf("ioutil.ReadAll() failed: %w", err) <mask> } </s> Pull request: 2305 limit message size Merge in DNS/adguard-home from 2305-limit-message-size to master Closes #2305. Squashed commit of the following: commit 6edd1e0521277a680f0053308efcf3d9cacc8e62 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 14:03:36 2020 +0300 aghio: fix final inaccuracies commit 4dd382aaf25132b31eb269749a2cd36daf0cb792 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:59:10 2020 +0300 all: improve code quality commit 060f923f6023d0e6f26441559b7023d5e5f96843 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Nov 23 13:10:57 2020 +0300 aghio: add validation to constructor commit f57a2f596f5dc578548241c315c68dce7fc93905 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:19:26 2020 +0300 all: fix minor inaccuracies commit 93462c71725d3d00655a4bd565b77e64451fff60 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:13:23 2020 +0300 home: make test name follow convention commit 4922986ad84481b054479c43b4133a1b97bee86b Merge: 1f5472abc 046ec13fd Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:09:01 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 1f5472abcfa7427f389825fc59eb4253e1e2bfb7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 19:08:21 2020 +0300 aghio: improve readability commit 60dc706b093fa22bbf62f13b2341934364ddc4df Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 18:44:08 2020 +0300 home: cover middleware with test commit bedf436b947ca1fa4493af2fc94f1f40beec7c35 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 17:10:23 2020 +0300 aghio: improved error informativeness commit 682c5da9f21fa330fb3536bb1c112129c91b9990 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Nov 20 13:37:51 2020 +0300 all: limit readers for ReadAll dealing with miscellanious data. commit 78c6dd8d90a0a43fe6ee3f9ed4d5fc637b15ba74 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 20:07:43 2020 +0300 all: handle ReadAll calls dealing with request's bodies. commit bfe1a6faf6468eb44515e2b0ecffa8c51f90b7e8 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 17:25:34 2020 +0300 home: add middlewares commit bbd1d491b318e6ba07f8af23ad546183383783a8 Merge: 7b77c2cad 62a8fe0b7 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Nov 19 16:44:04 2020 +0300 Merge branch 'master' into 2305-limit-message-size commit 7b77c2cad03154177392460982e1d73ee2a30177 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Nov 17 15:33:33 2020 +0300 aghio: create package </s> remove if resp != nil && resp.Body != nil { defer resp.Body.Close() </s> add defer resp.Body.Close() resp.Body, err = aghio.LimitReadCloser(resp.Body, MaxPackageFileSize) if err != nil { return fmt.Errorf("http request failed: %w", err) </s> remove return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err) </s> add return VersionInfo{}, fmt.Errorf("updater: LimitReadCloser: %w", err) </s> remove if resp != nil && resp.Body != nil { defer resp.Body.Close() </s> add if err != nil { return VersionInfo{}, fmt.Errorf("updater: HTTP GET %s: %w", u.VersionURL, err)
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c129361e55aea50c3454feca90025937261214ee
internal/update/updater.go
{formatClientCell(row, true, false)}
<mask> <mask> return ( <mask> <> <mask> <div className="logs__row logs__row--overflow logs__row--column"> <mask> {formatClientCell(row, true)} <mask> </div> <mask> {ipMatchListStatus !== IP_MATCH_LIST_STATUS.CIDR <mask> && renderBlockingButton(ipMatchListStatus, value, toggleClientStatus, processing)} <mask> </> <mask> ); </s> Merge: - client: fix names of clients in the top clients list Closes #1893 Squashed commit of the following: commit e5de0c4f53558e1ad89dc0069192e534f244f120 Author: Ildar Kamalov <ik@adguard.com> Date: Mon Jul 20 14:29:23 2020 +0300 - client: fix names of clients in the top clients list </s> remove nameContainer = !whois_info && isDetailed ? <small title={value}>{value}</small> : <div className="logs__text logs__text--nowrap" title={`${name} (${value})`}> {name} {' '} <small>{`(${value})`}</small> </div>; </s> add if (isLogs) { nameContainer = !whois_info && isDetailed ? ( <small title={value}>{value}</small> ) : ( <div className="logs__text logs__text--nowrap" title={`${name} (${value})`}> {name}&nbsp;<small>{`(${value})`}</small> </div> ); } else { nameContainer = ( <div className="logs__text logs__text--nowrap" title={`${name} (${value})`} > {name}&nbsp;<small>{`(${value})`}</small> </div> ); } </s> remove export const formatClientCell = (row, isDetailed = false) => { </s> add export const formatClientCell = (row, isDetailed = false, isLogs = true) => {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c131ac445acae449789dd14f452e740b770321db
client/src/components/Dashboard/Clients.js
export const formatClientCell = (row, isDetailed = false, isLogs = true) => {
<mask> }) <mask> ); <mask> }; <mask> <mask> export const formatClientCell = (row, isDetailed = false) => { <mask> const { value, original: { info } } = row; <mask> let whoisContainer = ''; <mask> let nameContainer = value; <mask> <mask> if (info) { </s> Merge: - client: fix names of clients in the top clients list Closes #1893 Squashed commit of the following: commit e5de0c4f53558e1ad89dc0069192e534f244f120 Author: Ildar Kamalov <ik@adguard.com> Date: Mon Jul 20 14:29:23 2020 +0300 - client: fix names of clients in the top clients list </s> remove nameContainer = !whois_info && isDetailed ? <small title={value}>{value}</small> : <div className="logs__text logs__text--nowrap" title={`${name} (${value})`}> {name} {' '} <small>{`(${value})`}</small> </div>; </s> add if (isLogs) { nameContainer = !whois_info && isDetailed ? ( <small title={value}>{value}</small> ) : ( <div className="logs__text logs__text--nowrap" title={`${name} (${value})`}> {name}&nbsp;<small>{`(${value})`}</small> </div> ); } else { nameContainer = ( <div className="logs__text logs__text--nowrap" title={`${name} (${value})`} > {name}&nbsp;<small>{`(${value})`}</small> </div> ); } </s> remove {formatClientCell(row, true)} </s> add {formatClientCell(row, true, false)}
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c131ac445acae449789dd14f452e740b770321db
client/src/helpers/formatClientCell.js
if (isLogs) { nameContainer = !whois_info && isDetailed ? ( <small title={value}>{value}</small> ) : ( <div className="logs__text logs__text--nowrap" title={`${name} (${value})`}> {name}&nbsp;<small>{`(${value})`}</small> </div> ); } else { nameContainer = ( <div className="logs__text logs__text--nowrap" title={`${name} (${value})`} > {name}&nbsp;<small>{`(${value})`}</small> </div> ); }
<mask> if (info) { <mask> const { name, whois_info } = info; <mask> <mask> if (name) { <mask> nameContainer = !whois_info && isDetailed <mask> ? <small title={value}>{value}</small> <mask> : <div className="logs__text logs__text--nowrap" title={`${name} (${value})`}> <mask> {name} <mask> {' '} <mask> <small>{`(${value})`}</small> <mask> </div>; <mask> } <mask> <mask> if (whois_info && isDetailed) { <mask> whoisContainer = ( <mask> <div className="logs__text logs__text--wrap logs__text--whois"> </s> Merge: - client: fix names of clients in the top clients list Closes #1893 Squashed commit of the following: commit e5de0c4f53558e1ad89dc0069192e534f244f120 Author: Ildar Kamalov <ik@adguard.com> Date: Mon Jul 20 14:29:23 2020 +0300 - client: fix names of clients in the top clients list </s> remove export const formatClientCell = (row, isDetailed = false) => { </s> add export const formatClientCell = (row, isDetailed = false, isLogs = true) => { </s> remove {formatClientCell(row, true)} </s> add {formatClientCell(row, true, false)}
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c131ac445acae449789dd14f452e740b770321db
client/src/helpers/formatClientCell.js
count := 0
<mask> } <mask> defer file.Close() <mask> <mask> scanner := bufio.NewScanner(file) <mask> for scanner.Scan() { <mask> text := scanner.Text() <mask> if d.parseEtcHosts(text) { <mask> continue <mask> } </s> coredns plugin -- give feedback how many rules were in rulefile
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c143e3d57fe191b39f219b7dd2e8ffdfc706f1ae
coredns_plugin/coredns_plugin.go
count++
<mask> } <mask> if err != nil { <mask> return nil, err <mask> } <mask> } <mask> log.Printf("Added %d rules from %s", count, filterFileName) <mask> <mask> if err = scanner.Err(); err != nil { </s> coredns plugin -- give feedback how many rules were in rulefile
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c143e3d57fe191b39f219b7dd2e8ffdfc706f1ae
coredns_plugin/coredns_plugin.go
log.Printf("Added %d rules from %s", count, filterFileName)
<mask> return nil, err <mask> } <mask> count++ <mask> } <mask> <mask> if err = scanner.Err(); err != nil { <mask> return nil, err <mask> } <mask> </s> coredns plugin -- give feedback how many rules were in rulefile
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c143e3d57fe191b39f219b7dd2e8ffdfc706f1ae
coredns_plugin/coredns_plugin.go
TLS tlsConfig `yaml:"tls"`
<mask> AuthName string `yaml:"auth_name"` <mask> AuthPass string `yaml:"auth_pass"` <mask> Language string `yaml:"language"` // two-letter ISO 639-1 language code <mask> DNS dnsConfig `yaml:"dns"` <mask> Filters []filter `yaml:"filters"` <mask> UserRules []string `yaml:"user_rules"` <mask> DHCP dhcpd.ServerConfig `yaml:"dhcp"` <mask> </s> Move up tls block in config, don't send json with zero values </s> remove TLS tlsConfig `yaml:"tls"` </s> add </s> remove ServerName string `yaml:"server_name" json:"server_name"` ForceHTTPS bool `yaml:"force_https" json:"force_https"` PortHTTPS int `yaml:"port_https" json:"port_https"` PortDNSOverTLS int `yaml:"port_dns_over_tls" json:"port_dns_over_tls"` </s> add ServerName string `yaml:"server_name" json:"server_name,omitempty"` ForceHTTPS bool `yaml:"force_https" json:"force_https,omitempty"` PortHTTPS int `yaml:"port_https" json:"port_https,omitempty"` PortDNSOverTLS int `yaml:"port_dns_over_tls" json:"port_dns_over_tls,omitempty"`
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c19416bf8e836ebba204d0e6def424c9bacb645c
config.go
<mask> DNS dnsConfig `yaml:"dns"` <mask> Filters []filter `yaml:"filters"` <mask> UserRules []string `yaml:"user_rules"` <mask> DHCP dhcpd.ServerConfig `yaml:"dhcp"` <mask> TLS tlsConfig `yaml:"tls"` <mask> <mask> logSettings `yaml:",inline"` <mask> <mask> sync.RWMutex `yaml:"-"` <mask> </s> Move up tls block in config, don't send json with zero values </s> remove ServerName string `yaml:"server_name" json:"server_name"` ForceHTTPS bool `yaml:"force_https" json:"force_https"` PortHTTPS int `yaml:"port_https" json:"port_https"` PortDNSOverTLS int `yaml:"port_dns_over_tls" json:"port_dns_over_tls"` </s> add ServerName string `yaml:"server_name" json:"server_name,omitempty"` ForceHTTPS bool `yaml:"force_https" json:"force_https,omitempty"` PortHTTPS int `yaml:"port_https" json:"port_https,omitempty"` PortDNSOverTLS int `yaml:"port_dns_over_tls" json:"port_dns_over_tls,omitempty"`
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c19416bf8e836ebba204d0e6def424c9bacb645c
config.go
ServerName string `yaml:"server_name" json:"server_name,omitempty"` ForceHTTPS bool `yaml:"force_https" json:"force_https,omitempty"` PortHTTPS int `yaml:"port_https" json:"port_https,omitempty"` PortDNSOverTLS int `yaml:"port_dns_over_tls" json:"port_dns_over_tls,omitempty"`
<mask> var defaultDNS = []string{"tls://1.1.1.1", "tls://1.0.0.1"} <mask> <mask> // field ordering is important -- yaml fields will mirror ordering from here <mask> type tlsConfig struct { <mask> ServerName string `yaml:"server_name" json:"server_name"` <mask> ForceHTTPS bool `yaml:"force_https" json:"force_https"` <mask> PortHTTPS int `yaml:"port_https" json:"port_https"` <mask> PortDNSOverTLS int `yaml:"port_dns_over_tls" json:"port_dns_over_tls"` <mask> CertificateChain string `yaml:"certificate_chain" json:"certificate_chain"` <mask> PrivateKey string `yaml:"private_key" json:"private_key"` <mask> } <mask> <mask> // initialize to default values, will be changed later when reading config or parsing command line </s> Move up tls block in config, don't send json with zero values </s> remove TLS tlsConfig `yaml:"tls"` </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c19416bf8e836ebba204d0e6def424c9bacb645c
config.go
"all_queries": "All queries",
<mask> "list_updated_plural": "{{count}} lists updated", <mask> "dnssec_enable": "Enable DNSSEC", <mask> "dnssec_enable_desc": "Set DNSSEC flag in the outcoming DNS queries and check the result (DNSSEC-enabled resolver is required)", <mask> "validated_with_dnssec": "Validated with DNSSEC", <mask> "show_all_responses": "All responses", <mask> "show_blocked_responses": "Blocked", <mask> "show_whitelisted_responses": "Whitelisted", <mask> "show_processed_responses": "Processed", <mask> "blocked_safebrowsing": "Blocked by Safebrowsing", <mask> "blocked_adult_websites": "Blocked Adult Websites", </s> + client: Update locales Squashed commit of the following: commit 6d743bb15974a85fedb004a3c639b1f849756e2d Merge: 1f6c5091 7d2c7a61 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 17 17:10:51 2020 +0300 Merge branch 'master' into feature/update_locales commit 1f6c50915e63c18834d63d3f8535d24a4e894647 Merge: 1a861a98 4df02714 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:23:08 2020 +0300 Merge branch 'master' into feature/update_locales commit 1a861a98326a749a347c184bb2b9aff663b3dd09 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:22:47 2020 +0300 Update locales commit 3f4850822c95b1147f39df939eca568f13b2c0dc Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 16:07:40 2020 +0300 Update locales commit 0f06bd8f188130e97394c8f20f27b66f263612cc Merge: 5abae336 38366ba8 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:59:22 2020 +0300 Merge branch 'master' into feature/update_locales commit 5abae33603e84dc410f77e7ec622314e85e03951 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:57:36 2020 +0300 Update locales commit 717455ecf42135077a7dae31281b1da0d89b27e3 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:45:15 2020 +0300 Rename label commit b399ef33eed3c0447d5c651d3b678d482dddbb5b Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:43:08 2020 +0300 Replace 'All responses' with 'All queries' commit 1f5a62a3d95906057c862b55d2ba91d67b346604 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 16:18:54 2020 +0300 + client: Update locales </s> remove "show_all_responses": "Semua respon", </s> add </s> remove "milliseconds_abbreviation": "ms" </s> add "milliseconds_abbreviation": "ms", "cache_size": "Cache grootte", "cache_size_desc": "DNS cache grootte (in bytes)", "cache_ttl_min_override": "Minimale TTL overschrijven", "cache_ttl_max_override": "Maximale TTL overschrijven", "enter_cache_size": "Cache grootte invoeren", "enter_cache_ttl_min_override": "Minimale TTL invoeren", "enter_cache_ttl_max_override": "Maximale TTL invoeren", "cache_ttl_min_override_desc": "Overschrijft TTL waarde (minimaal) ontvangen van de upstream server. Deze waarde mag niet hoger als 3600 (1 uur) zijn", "cache_ttl_max_override_desc": "Overschrijft TTL waarde (maximaal) ontvangen van de upstream server", "min_exceeds_max_value": "Minimale waarde overschrijdt de maximale waarde", "value_not_larger_than": "Waarde mag niet hoger zijn dan {{maximum}}", "filter_category_general": "Algemeen", "filter_category_security": "Beveiliging", "filter_category_regional": "Regionaal", "filter_category_other": "Overig", "filter_category_general_desc": "Lijsten die volgers en advertenties op de meeste apparaten blokkeert", "filter_category_security_desc": "Lijsten gespecialiseerd in het blokkeren van malware, phising of scam domeinen", "filter_category_regional_desc": "Lijsten die focussen op regionale ads en tracking servers", "filter_category_other_desc": "Overige blokkeerlijsten", "original_response": "Oorspronkelijke reactie", "click_to_view_queries": "Klik om queries te bekijken"
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c1e56c837b483873146a6d6218a15fe3c4b8cb7a
client/src/__locales/en.json
<mask> "client_blocked": "Klien \"{{ip}}\" sukses di blokir", <mask> "client_unblocked": "Klien \"{{ip}}\" sukses di unblock", <mask> "static_ip": "Alamat IP statis", <mask> "validated_with_dnssec": "Tervalidasi dengan DNSSEC", <mask> "show_all_responses": "Semua respon", <mask> "show_blocked_responses": "Diblokir", <mask> "show_whitelisted_responses": "Dalam Daftar Putih", <mask> "show_processed_responses": "Terproses", <mask> "safe_search": "Pencarian aman", <mask> "blocklist": "Daftar blokir", </s> + client: Update locales Squashed commit of the following: commit 6d743bb15974a85fedb004a3c639b1f849756e2d Merge: 1f6c5091 7d2c7a61 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 17 17:10:51 2020 +0300 Merge branch 'master' into feature/update_locales commit 1f6c50915e63c18834d63d3f8535d24a4e894647 Merge: 1a861a98 4df02714 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:23:08 2020 +0300 Merge branch 'master' into feature/update_locales commit 1a861a98326a749a347c184bb2b9aff663b3dd09 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:22:47 2020 +0300 Update locales commit 3f4850822c95b1147f39df939eca568f13b2c0dc Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 16:07:40 2020 +0300 Update locales commit 0f06bd8f188130e97394c8f20f27b66f263612cc Merge: 5abae336 38366ba8 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:59:22 2020 +0300 Merge branch 'master' into feature/update_locales commit 5abae33603e84dc410f77e7ec622314e85e03951 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:57:36 2020 +0300 Update locales commit 717455ecf42135077a7dae31281b1da0d89b27e3 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:45:15 2020 +0300 Rename label commit b399ef33eed3c0447d5c651d3b678d482dddbb5b Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:43:08 2020 +0300 Replace 'All responses' with 'All queries' commit 1f5a62a3d95906057c862b55d2ba91d67b346604 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 16:18:54 2020 +0300 + client: Update locales </s> remove "show_all_responses": "All responses", </s> add "all_queries": "All queries", </s> remove "milliseconds_abbreviation": "ms" </s> add "milliseconds_abbreviation": "ms", "cache_size": "Cache grootte", "cache_size_desc": "DNS cache grootte (in bytes)", "cache_ttl_min_override": "Minimale TTL overschrijven", "cache_ttl_max_override": "Maximale TTL overschrijven", "enter_cache_size": "Cache grootte invoeren", "enter_cache_ttl_min_override": "Minimale TTL invoeren", "enter_cache_ttl_max_override": "Maximale TTL invoeren", "cache_ttl_min_override_desc": "Overschrijft TTL waarde (minimaal) ontvangen van de upstream server. Deze waarde mag niet hoger als 3600 (1 uur) zijn", "cache_ttl_max_override_desc": "Overschrijft TTL waarde (maximaal) ontvangen van de upstream server", "min_exceeds_max_value": "Minimale waarde overschrijdt de maximale waarde", "value_not_larger_than": "Waarde mag niet hoger zijn dan {{maximum}}", "filter_category_general": "Algemeen", "filter_category_security": "Beveiliging", "filter_category_regional": "Regionaal", "filter_category_other": "Overig", "filter_category_general_desc": "Lijsten die volgers en advertenties op de meeste apparaten blokkeert", "filter_category_security_desc": "Lijsten gespecialiseerd in het blokkeren van malware, phising of scam domeinen", "filter_category_regional_desc": "Lijsten die focussen op regionale ads en tracking servers", "filter_category_other_desc": "Overige blokkeerlijsten", "original_response": "Oorspronkelijke reactie", "click_to_view_queries": "Klik om queries te bekijken"
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c1e56c837b483873146a6d6218a15fe3c4b8cb7a
client/src/__locales/id.json
"choose_blocklist": "Scegli liste di blocco", "choose_allowlist": "Scegli liste di autorizzazione",
<mask> "new_allowlist": "Nuova lista dei consentiti", <mask> "edit_blocklist": "Modifica lista di blocco", <mask> "edit_allowlist": "Modifica lista dei consentiti", <mask> "enter_valid_blocklist": "Inserisci un URL valido nella lista di blocco.", <mask> "enter_valid_allowlist": "Inserisci un URL valido nella lista dei consentiti.", <mask> "form_error_url_format": "Formato url non valido", <mask> "form_error_url_or_path_format": "URL o percorso assoluto della lista non valido", </s> + client: Update locales Squashed commit of the following: commit 6d743bb15974a85fedb004a3c639b1f849756e2d Merge: 1f6c5091 7d2c7a61 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 17 17:10:51 2020 +0300 Merge branch 'master' into feature/update_locales commit 1f6c50915e63c18834d63d3f8535d24a4e894647 Merge: 1a861a98 4df02714 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:23:08 2020 +0300 Merge branch 'master' into feature/update_locales commit 1a861a98326a749a347c184bb2b9aff663b3dd09 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:22:47 2020 +0300 Update locales commit 3f4850822c95b1147f39df939eca568f13b2c0dc Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 16:07:40 2020 +0300 Update locales commit 0f06bd8f188130e97394c8f20f27b66f263612cc Merge: 5abae336 38366ba8 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:59:22 2020 +0300 Merge branch 'master' into feature/update_locales commit 5abae33603e84dc410f77e7ec622314e85e03951 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:57:36 2020 +0300 Update locales commit 717455ecf42135077a7dae31281b1da0d89b27e3 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:45:15 2020 +0300 Rename label commit b399ef33eed3c0447d5c651d3b678d482dddbb5b Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:43:08 2020 +0300 Replace 'All responses' with 'All queries' commit 1f5a62a3d95906057c862b55d2ba91d67b346604 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 16:18:54 2020 +0300 + client: Update locales </s> remove "show_all_responses": "Semua respon", </s> add
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c1e56c837b483873146a6d6218a15fe3c4b8cb7a
client/src/__locales/it.json
"response_code": "Codice di risposta",
<mask> "type_table_header": "Tipo", <mask> "response_table_header": "Risposta", <mask> "client_table_header": "Client", <mask> "empty_response_status": "Vuoto", <mask> "show_all_filter_type": "Mostra tutti", <mask> "show_filtered_type": "Mostra filtrati", <mask> "no_logs_found": "Nessun log trovato", <mask> "refresh_btn": "Aggiorna", </s> + client: Update locales Squashed commit of the following: commit 6d743bb15974a85fedb004a3c639b1f849756e2d Merge: 1f6c5091 7d2c7a61 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 17 17:10:51 2020 +0300 Merge branch 'master' into feature/update_locales commit 1f6c50915e63c18834d63d3f8535d24a4e894647 Merge: 1a861a98 4df02714 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:23:08 2020 +0300 Merge branch 'master' into feature/update_locales commit 1a861a98326a749a347c184bb2b9aff663b3dd09 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:22:47 2020 +0300 Update locales commit 3f4850822c95b1147f39df939eca568f13b2c0dc Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 16:07:40 2020 +0300 Update locales commit 0f06bd8f188130e97394c8f20f27b66f263612cc Merge: 5abae336 38366ba8 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:59:22 2020 +0300 Merge branch 'master' into feature/update_locales commit 5abae33603e84dc410f77e7ec622314e85e03951 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:57:36 2020 +0300 Update locales commit 717455ecf42135077a7dae31281b1da0d89b27e3 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:45:15 2020 +0300 Rename label commit b399ef33eed3c0447d5c651d3b678d482dddbb5b Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:43:08 2020 +0300 Replace 'All responses' with 'All queries' commit 1f5a62a3d95906057c862b55d2ba91d67b346604 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 16:18:54 2020 +0300 + client: Update locales </s> remove label: 'show_all_responses', </s> add label: 'all_queries',
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c1e56c837b483873146a6d6218a15fe3c4b8cb7a
client/src/__locales/it.json
"choose_blocklist": "Blokkeringslijsten selecteren", "choose_allowlist": "Toestemmingslijsten selecteren",
<mask> "new_blocklist": "Nieuwe blokkeerlijst", <mask> "new_allowlist": "Nieuwe toestemmingslijst", <mask> "edit_blocklist": "Blokkeerlijst beheren", <mask> "edit_allowlist": "Toestemmingslijst beheren", <mask> "enter_valid_blocklist": "Voer een geldige URL in voor de blokkeerlijst.", <mask> "enter_valid_allowlist": "Voer een geldige URL in voor de toestemmingslijst.", <mask> "form_error_url_format": "Ongeldig URL formaat", <mask> "form_error_url_or_path_format": "Ongeldig URL of pad van de lijst", </s> + client: Update locales Squashed commit of the following: commit 6d743bb15974a85fedb004a3c639b1f849756e2d Merge: 1f6c5091 7d2c7a61 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 17 17:10:51 2020 +0300 Merge branch 'master' into feature/update_locales commit 1f6c50915e63c18834d63d3f8535d24a4e894647 Merge: 1a861a98 4df02714 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:23:08 2020 +0300 Merge branch 'master' into feature/update_locales commit 1a861a98326a749a347c184bb2b9aff663b3dd09 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:22:47 2020 +0300 Update locales commit 3f4850822c95b1147f39df939eca568f13b2c0dc Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 16:07:40 2020 +0300 Update locales commit 0f06bd8f188130e97394c8f20f27b66f263612cc Merge: 5abae336 38366ba8 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:59:22 2020 +0300 Merge branch 'master' into feature/update_locales commit 5abae33603e84dc410f77e7ec622314e85e03951 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:57:36 2020 +0300 Update locales commit 717455ecf42135077a7dae31281b1da0d89b27e3 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:45:15 2020 +0300 Rename label commit b399ef33eed3c0447d5c651d3b678d482dddbb5b Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:43:08 2020 +0300 Replace 'All responses' with 'All queries' commit 1f5a62a3d95906057c862b55d2ba91d67b346604 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 16:18:54 2020 +0300 + client: Update locales
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c1e56c837b483873146a6d6218a15fe3c4b8cb7a
client/src/__locales/nl.json
"blocked_by_cname_or_ip": "Geblokkeerd via CNAME of IP",
<mask> "whois": "Whois", <mask> "filtering_rules_learn_more": "<0>Meer informatie</0> over het maken van je eigen host lijsten.", <mask> "blocked_by_response": "Geblokkeerd door CNAME of IP als antwoord", <mask> "try_again": "Probeer opnieuw", <mask> "domain_desc": "Voer de domeinnaam of wildcard in die herschreven moet worden.", <mask> "example_rewrite_domain": "herschrijf reacties uitsluitend voor deze domeinnaam.", <mask> "example_rewrite_wildcard": "herschrijf reacties voor alle subdomeinen van <0>example.org</0>.", <mask> "rewrite_ip_address": "IP adres: gebruik dit IP in een A of AAAA antwoord", <mask> "rewrite_domain_name": "Domeinnaam: een CNAME record toevoegen", </s> + client: Update locales Squashed commit of the following: commit 6d743bb15974a85fedb004a3c639b1f849756e2d Merge: 1f6c5091 7d2c7a61 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 17 17:10:51 2020 +0300 Merge branch 'master' into feature/update_locales commit 1f6c50915e63c18834d63d3f8535d24a4e894647 Merge: 1a861a98 4df02714 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:23:08 2020 +0300 Merge branch 'master' into feature/update_locales commit 1a861a98326a749a347c184bb2b9aff663b3dd09 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:22:47 2020 +0300 Update locales commit 3f4850822c95b1147f39df939eca568f13b2c0dc Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 16:07:40 2020 +0300 Update locales commit 0f06bd8f188130e97394c8f20f27b66f263612cc Merge: 5abae336 38366ba8 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:59:22 2020 +0300 Merge branch 'master' into feature/update_locales commit 5abae33603e84dc410f77e7ec622314e85e03951 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:57:36 2020 +0300 Update locales commit 717455ecf42135077a7dae31281b1da0d89b27e3 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:45:15 2020 +0300 Rename label commit b399ef33eed3c0447d5c651d3b678d482dddbb5b Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:43:08 2020 +0300 Replace 'All responses' with 'All queries' commit 1f5a62a3d95906057c862b55d2ba91d67b346604 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 16:18:54 2020 +0300 + client: Update locales </s> remove "milliseconds_abbreviation": "ms" </s> add "milliseconds_abbreviation": "ms", "cache_size": "Cache grootte", "cache_size_desc": "DNS cache grootte (in bytes)", "cache_ttl_min_override": "Minimale TTL overschrijven", "cache_ttl_max_override": "Maximale TTL overschrijven", "enter_cache_size": "Cache grootte invoeren", "enter_cache_ttl_min_override": "Minimale TTL invoeren", "enter_cache_ttl_max_override": "Maximale TTL invoeren", "cache_ttl_min_override_desc": "Overschrijft TTL waarde (minimaal) ontvangen van de upstream server. Deze waarde mag niet hoger als 3600 (1 uur) zijn", "cache_ttl_max_override_desc": "Overschrijft TTL waarde (maximaal) ontvangen van de upstream server", "min_exceeds_max_value": "Minimale waarde overschrijdt de maximale waarde", "value_not_larger_than": "Waarde mag niet hoger zijn dan {{maximum}}", "filter_category_general": "Algemeen", "filter_category_security": "Beveiliging", "filter_category_regional": "Regionaal", "filter_category_other": "Overig", "filter_category_general_desc": "Lijsten die volgers en advertenties op de meeste apparaten blokkeert", "filter_category_security_desc": "Lijsten gespecialiseerd in het blokkeren van malware, phising of scam domeinen", "filter_category_regional_desc": "Lijsten die focussen op regionale ads en tracking servers", "filter_category_other_desc": "Overige blokkeerlijsten", "original_response": "Oorspronkelijke reactie", "click_to_view_queries": "Klik om queries te bekijken"
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c1e56c837b483873146a6d6218a15fe3c4b8cb7a
client/src/__locales/nl.json
"rewrite_ip_address": "IP adres: gebruik dit IP in een A of AAAA antwoord", "rewrite_domain_name": "Domeinnaam: een CNAME record toevoegen", "rewrite_A": "<0>A</0>: speciale waarde, <0>A</0> records uit de upstream bewaren", "rewrite_AAAA": "<0>AAAA</0>: speciale waarde, <0>AAAA</0> records uit de upstream bewaren",
<mask> "domain_desc": "Voer de domeinnaam of wildcard in die herschreven moet worden.", <mask> "example_rewrite_domain": "herschrijf reacties uitsluitend voor deze domeinnaam.", <mask> "example_rewrite_wildcard": "herschrijf reacties voor alle subdomeinen van <0>example.org</0>.", <mask> "disable_ipv6": "Zet IPv6 uit", <mask> "disable_ipv6_desc": "Als deze functie is ingeschakeld, worden alle DNS-query's voor IPv6-adressen (type AAAA) verwijderd.", <mask> "fastest_addr": "Snelste IP adres", <mask> "fastest_addr_desc": "Alle DNS servers bevragen en het snelste IP adres terugkoppelen. Dit zal de DNS verzoeken vertragen omdat we moeten wachten op de antwoorden van alles DNS servers, maar verbetert wel de connectiviteit.", </s> + client: Update locales Squashed commit of the following: commit 6d743bb15974a85fedb004a3c639b1f849756e2d Merge: 1f6c5091 7d2c7a61 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 17 17:10:51 2020 +0300 Merge branch 'master' into feature/update_locales commit 1f6c50915e63c18834d63d3f8535d24a4e894647 Merge: 1a861a98 4df02714 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:23:08 2020 +0300 Merge branch 'master' into feature/update_locales commit 1a861a98326a749a347c184bb2b9aff663b3dd09 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:22:47 2020 +0300 Update locales commit 3f4850822c95b1147f39df939eca568f13b2c0dc Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 16:07:40 2020 +0300 Update locales commit 0f06bd8f188130e97394c8f20f27b66f263612cc Merge: 5abae336 38366ba8 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:59:22 2020 +0300 Merge branch 'master' into feature/update_locales commit 5abae33603e84dc410f77e7ec622314e85e03951 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:57:36 2020 +0300 Update locales commit 717455ecf42135077a7dae31281b1da0d89b27e3 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:45:15 2020 +0300 Rename label commit b399ef33eed3c0447d5c651d3b678d482dddbb5b Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:43:08 2020 +0300 Replace 'All responses' with 'All queries' commit 1f5a62a3d95906057c862b55d2ba91d67b346604 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 16:18:54 2020 +0300 + client: Update locales </s> remove "milliseconds_abbreviation": "ms" </s> add "milliseconds_abbreviation": "ms", "cache_size": "Cache grootte", "cache_size_desc": "DNS cache grootte (in bytes)", "cache_ttl_min_override": "Minimale TTL overschrijven", "cache_ttl_max_override": "Maximale TTL overschrijven", "enter_cache_size": "Cache grootte invoeren", "enter_cache_ttl_min_override": "Minimale TTL invoeren", "enter_cache_ttl_max_override": "Maximale TTL invoeren", "cache_ttl_min_override_desc": "Overschrijft TTL waarde (minimaal) ontvangen van de upstream server. Deze waarde mag niet hoger als 3600 (1 uur) zijn", "cache_ttl_max_override_desc": "Overschrijft TTL waarde (maximaal) ontvangen van de upstream server", "min_exceeds_max_value": "Minimale waarde overschrijdt de maximale waarde", "value_not_larger_than": "Waarde mag niet hoger zijn dan {{maximum}}", "filter_category_general": "Algemeen", "filter_category_security": "Beveiliging", "filter_category_regional": "Regionaal", "filter_category_other": "Overig", "filter_category_general_desc": "Lijsten die volgers en advertenties op de meeste apparaten blokkeert", "filter_category_security_desc": "Lijsten gespecialiseerd in het blokkeren van malware, phising of scam domeinen", "filter_category_regional_desc": "Lijsten die focussen op regionale ads en tracking servers", "filter_category_other_desc": "Overige blokkeerlijsten", "original_response": "Oorspronkelijke reactie", "click_to_view_queries": "Klik om queries te bekijken" </s> remove "show_all_responses": "All responses", </s> add "all_queries": "All queries",
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c1e56c837b483873146a6d6218a15fe3c4b8cb7a
client/src/__locales/nl.json
"choose_from_list": "Uit de lijst selecteren", "add_custom_list": "Aangepaste lijst toevoegen",
<mask> "check_desc": "Controleer of de hostnaam wordt gefilterd", <mask> "check": "Controleren", <mask> "form_enter_host": "Voer een hostnaam in", <mask> "filtered_custom_rules": "Gefilterd door aangepaste filterregels", <mask> "host_whitelisted": "De host staat op de toestemmingslijst", <mask> "check_ip": "IP-adressen: {{ip}}", <mask> "check_cname": "CNAME: {{cname}}", <mask> "check_reason": "Reden: {{reason}}", <mask> "check_rule": "Regel: {{rule}}", </s> + client: Update locales Squashed commit of the following: commit 6d743bb15974a85fedb004a3c639b1f849756e2d Merge: 1f6c5091 7d2c7a61 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 17 17:10:51 2020 +0300 Merge branch 'master' into feature/update_locales commit 1f6c50915e63c18834d63d3f8535d24a4e894647 Merge: 1a861a98 4df02714 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:23:08 2020 +0300 Merge branch 'master' into feature/update_locales commit 1a861a98326a749a347c184bb2b9aff663b3dd09 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:22:47 2020 +0300 Update locales commit 3f4850822c95b1147f39df939eca568f13b2c0dc Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 16:07:40 2020 +0300 Update locales commit 0f06bd8f188130e97394c8f20f27b66f263612cc Merge: 5abae336 38366ba8 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:59:22 2020 +0300 Merge branch 'master' into feature/update_locales commit 5abae33603e84dc410f77e7ec622314e85e03951 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:57:36 2020 +0300 Update locales commit 717455ecf42135077a7dae31281b1da0d89b27e3 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:45:15 2020 +0300 Rename label commit b399ef33eed3c0447d5c651d3b678d482dddbb5b Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:43:08 2020 +0300 Replace 'All responses' with 'All queries' commit 1f5a62a3d95906057c862b55d2ba91d67b346604 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 16:18:54 2020 +0300 + client: Update locales </s> remove "milliseconds_abbreviation": "ms" </s> add "milliseconds_abbreviation": "ms", "cache_size": "Cache grootte", "cache_size_desc": "DNS cache grootte (in bytes)", "cache_ttl_min_override": "Minimale TTL overschrijven", "cache_ttl_max_override": "Maximale TTL overschrijven", "enter_cache_size": "Cache grootte invoeren", "enter_cache_ttl_min_override": "Minimale TTL invoeren", "enter_cache_ttl_max_override": "Maximale TTL invoeren", "cache_ttl_min_override_desc": "Overschrijft TTL waarde (minimaal) ontvangen van de upstream server. Deze waarde mag niet hoger als 3600 (1 uur) zijn", "cache_ttl_max_override_desc": "Overschrijft TTL waarde (maximaal) ontvangen van de upstream server", "min_exceeds_max_value": "Minimale waarde overschrijdt de maximale waarde", "value_not_larger_than": "Waarde mag niet hoger zijn dan {{maximum}}", "filter_category_general": "Algemeen", "filter_category_security": "Beveiliging", "filter_category_regional": "Regionaal", "filter_category_other": "Overig", "filter_category_general_desc": "Lijsten die volgers en advertenties op de meeste apparaten blokkeert", "filter_category_security_desc": "Lijsten gespecialiseerd in het blokkeren van malware, phising of scam domeinen", "filter_category_regional_desc": "Lijsten die focussen op regionale ads en tracking servers", "filter_category_other_desc": "Overige blokkeerlijsten", "original_response": "Oorspronkelijke reactie", "click_to_view_queries": "Klik om queries te bekijken"
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c1e56c837b483873146a6d6218a15fe3c4b8cb7a
client/src/__locales/nl.json
"milliseconds_abbreviation": "ms", "cache_size": "Cache grootte", "cache_size_desc": "DNS cache grootte (in bytes)", "cache_ttl_min_override": "Minimale TTL overschrijven", "cache_ttl_max_override": "Maximale TTL overschrijven", "enter_cache_size": "Cache grootte invoeren", "enter_cache_ttl_min_override": "Minimale TTL invoeren", "enter_cache_ttl_max_override": "Maximale TTL invoeren", "cache_ttl_min_override_desc": "Overschrijft TTL waarde (minimaal) ontvangen van de upstream server. Deze waarde mag niet hoger als 3600 (1 uur) zijn", "cache_ttl_max_override_desc": "Overschrijft TTL waarde (maximaal) ontvangen van de upstream server", "min_exceeds_max_value": "Minimale waarde overschrijdt de maximale waarde", "value_not_larger_than": "Waarde mag niet hoger zijn dan {{maximum}}", "filter_category_general": "Algemeen", "filter_category_security": "Beveiliging", "filter_category_regional": "Regionaal", "filter_category_other": "Overig", "filter_category_general_desc": "Lijsten die volgers en advertenties op de meeste apparaten blokkeert", "filter_category_security_desc": "Lijsten gespecialiseerd in het blokkeren van malware, phising of scam domeinen", "filter_category_regional_desc": "Lijsten die focussen op regionale ads en tracking servers", "filter_category_other_desc": "Overige blokkeerlijsten", "original_response": "Oorspronkelijke reactie", "click_to_view_queries": "Klik om queries te bekijken"
<mask> "filtered": "Gefilterd", <mask> "rewritten": "Herschreven", <mask> "safe_search": "Veilig zoeken", <mask> "blocklist": "Blokkeerlijst", <mask> "milliseconds_abbreviation": "ms" <mask> } </s> + client: Update locales Squashed commit of the following: commit 6d743bb15974a85fedb004a3c639b1f849756e2d Merge: 1f6c5091 7d2c7a61 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 17 17:10:51 2020 +0300 Merge branch 'master' into feature/update_locales commit 1f6c50915e63c18834d63d3f8535d24a4e894647 Merge: 1a861a98 4df02714 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:23:08 2020 +0300 Merge branch 'master' into feature/update_locales commit 1a861a98326a749a347c184bb2b9aff663b3dd09 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:22:47 2020 +0300 Update locales commit 3f4850822c95b1147f39df939eca568f13b2c0dc Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 16:07:40 2020 +0300 Update locales commit 0f06bd8f188130e97394c8f20f27b66f263612cc Merge: 5abae336 38366ba8 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:59:22 2020 +0300 Merge branch 'master' into feature/update_locales commit 5abae33603e84dc410f77e7ec622314e85e03951 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:57:36 2020 +0300 Update locales commit 717455ecf42135077a7dae31281b1da0d89b27e3 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:45:15 2020 +0300 Rename label commit b399ef33eed3c0447d5c651d3b678d482dddbb5b Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:43:08 2020 +0300 Replace 'All responses' with 'All queries' commit 1f5a62a3d95906057c862b55d2ba91d67b346604 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 16:18:54 2020 +0300 + client: Update locales </s> remove "show_all_responses": "Semua respon", </s> add </s> remove label: 'show_all_responses', </s> add label: 'all_queries',
[ "keep", "keep", "keep", "keep", "replace", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c1e56c837b483873146a6d6218a15fe3c4b8cb7a
client/src/__locales/nl.json
"enter_url_or_path_hint": "Skriv inn listens URL eller fulle filbane",
<mask> "add_blocklist": "Legg til blokkeringsliste", <mask> "add_allowlist": "Legg til hviteliste", <mask> "cancel_btn": "Avbryt", <mask> "enter_name_hint": "Skriv inn navn", <mask> "check_updates_btn": "Se etter oppdateringer", <mask> "new_blocklist": "Ny blokkeringsliste", <mask> "new_allowlist": "Ny hviteliste", <mask> "edit_blocklist": "Rediger blokkeringsliste", </s> + client: Update locales Squashed commit of the following: commit 6d743bb15974a85fedb004a3c639b1f849756e2d Merge: 1f6c5091 7d2c7a61 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 17 17:10:51 2020 +0300 Merge branch 'master' into feature/update_locales commit 1f6c50915e63c18834d63d3f8535d24a4e894647 Merge: 1a861a98 4df02714 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:23:08 2020 +0300 Merge branch 'master' into feature/update_locales commit 1a861a98326a749a347c184bb2b9aff663b3dd09 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:22:47 2020 +0300 Update locales commit 3f4850822c95b1147f39df939eca568f13b2c0dc Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 16:07:40 2020 +0300 Update locales commit 0f06bd8f188130e97394c8f20f27b66f263612cc Merge: 5abae336 38366ba8 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:59:22 2020 +0300 Merge branch 'master' into feature/update_locales commit 5abae33603e84dc410f77e7ec622314e85e03951 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:57:36 2020 +0300 Update locales commit 717455ecf42135077a7dae31281b1da0d89b27e3 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:45:15 2020 +0300 Rename label commit b399ef33eed3c0447d5c651d3b678d482dddbb5b Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:43:08 2020 +0300 Replace 'All responses' with 'All queries' commit 1f5a62a3d95906057c862b55d2ba91d67b346604 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 16:18:54 2020 +0300 + client: Update locales </s> remove label: 'show_all_responses', </s> add label: 'all_queries',
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c1e56c837b483873146a6d6218a15fe3c4b8cb7a
client/src/__locales/no.json
"choose_blocklist": "Velg blokkeringslister",
<mask> "edit_blocklist": "Rediger blokkeringsliste", <mask> "edit_allowlist": "Rediger hviteliste", <mask> "enter_valid_blocklist": "Skriv inn en gyldig nettadresse til blokkeringslisten.", <mask> "enter_valid_allowlist": "Skriv inn en gyldig nettadresse til hvitelisten.", <mask> "form_error_url_format": "Ugyldig URL-format", <mask> "form_error_url_or_path_format": "Listens URL eller fulle filbane er ugyldig", </s> + client: Update locales Squashed commit of the following: commit 6d743bb15974a85fedb004a3c639b1f849756e2d Merge: 1f6c5091 7d2c7a61 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 17 17:10:51 2020 +0300 Merge branch 'master' into feature/update_locales commit 1f6c50915e63c18834d63d3f8535d24a4e894647 Merge: 1a861a98 4df02714 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:23:08 2020 +0300 Merge branch 'master' into feature/update_locales commit 1a861a98326a749a347c184bb2b9aff663b3dd09 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:22:47 2020 +0300 Update locales commit 3f4850822c95b1147f39df939eca568f13b2c0dc Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 16:07:40 2020 +0300 Update locales commit 0f06bd8f188130e97394c8f20f27b66f263612cc Merge: 5abae336 38366ba8 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:59:22 2020 +0300 Merge branch 'master' into feature/update_locales commit 5abae33603e84dc410f77e7ec622314e85e03951 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:57:36 2020 +0300 Update locales commit 717455ecf42135077a7dae31281b1da0d89b27e3 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:45:15 2020 +0300 Rename label commit b399ef33eed3c0447d5c651d3b678d482dddbb5b Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:43:08 2020 +0300 Replace 'All responses' with 'All queries' commit 1f5a62a3d95906057c862b55d2ba91d67b346604 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 16:18:54 2020 +0300 + client: Update locales </s> remove "milliseconds_abbreviation": "ms" </s> add "milliseconds_abbreviation": "ms", "cache_size": "Cache grootte", "cache_size_desc": "DNS cache grootte (in bytes)", "cache_ttl_min_override": "Minimale TTL overschrijven", "cache_ttl_max_override": "Maximale TTL overschrijven", "enter_cache_size": "Cache grootte invoeren", "enter_cache_ttl_min_override": "Minimale TTL invoeren", "enter_cache_ttl_max_override": "Maximale TTL invoeren", "cache_ttl_min_override_desc": "Overschrijft TTL waarde (minimaal) ontvangen van de upstream server. Deze waarde mag niet hoger als 3600 (1 uur) zijn", "cache_ttl_max_override_desc": "Overschrijft TTL waarde (maximaal) ontvangen van de upstream server", "min_exceeds_max_value": "Minimale waarde overschrijdt de maximale waarde", "value_not_larger_than": "Waarde mag niet hoger zijn dan {{maximum}}", "filter_category_general": "Algemeen", "filter_category_security": "Beveiliging", "filter_category_regional": "Regionaal", "filter_category_other": "Overig", "filter_category_general_desc": "Lijsten die volgers en advertenties op de meeste apparaten blokkeert", "filter_category_security_desc": "Lijsten gespecialiseerd in het blokkeren van malware, phising of scam domeinen", "filter_category_regional_desc": "Lijsten die focussen op regionale ads en tracking servers", "filter_category_other_desc": "Overige blokkeerlijsten", "original_response": "Oorspronkelijke reactie", "click_to_view_queries": "Klik om queries te bekijken"
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c1e56c837b483873146a6d6218a15fe3c4b8cb7a
client/src/__locales/no.json
"domain_or_client": "Domene eller klient",
<mask> "time_table_header": "Tidspunkt", <mask> "date": "Dato", <mask> "domain_name_table_header": "Domenenavn", <mask> "type_table_header": "Type", <mask> "response_table_header": "Respons", <mask> "response_code": "Svarkode", <mask> "client_table_header": "Klient", <mask> "empty_response_status": "Tomt innhold", </s> + client: Update locales Squashed commit of the following: commit 6d743bb15974a85fedb004a3c639b1f849756e2d Merge: 1f6c5091 7d2c7a61 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 17 17:10:51 2020 +0300 Merge branch 'master' into feature/update_locales commit 1f6c50915e63c18834d63d3f8535d24a4e894647 Merge: 1a861a98 4df02714 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:23:08 2020 +0300 Merge branch 'master' into feature/update_locales commit 1a861a98326a749a347c184bb2b9aff663b3dd09 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:22:47 2020 +0300 Update locales commit 3f4850822c95b1147f39df939eca568f13b2c0dc Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 16:07:40 2020 +0300 Update locales commit 0f06bd8f188130e97394c8f20f27b66f263612cc Merge: 5abae336 38366ba8 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:59:22 2020 +0300 Merge branch 'master' into feature/update_locales commit 5abae33603e84dc410f77e7ec622314e85e03951 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:57:36 2020 +0300 Update locales commit 717455ecf42135077a7dae31281b1da0d89b27e3 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:45:15 2020 +0300 Rename label commit b399ef33eed3c0447d5c651d3b678d482dddbb5b Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:43:08 2020 +0300 Replace 'All responses' with 'All queries' commit 1f5a62a3d95906057c862b55d2ba91d67b346604 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 16:18:54 2020 +0300 + client: Update locales </s> remove label: 'show_all_responses', </s> add label: 'all_queries',
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c1e56c837b483873146a6d6218a15fe3c4b8cb7a
client/src/__locales/no.json
"response_code": "Svarkode",
<mask> "domain_name_table_header": "Domenenavn", <mask> "domain_or_client": "Domene eller klient", <mask> "type_table_header": "Type", <mask> "response_table_header": "Respons", <mask> "client_table_header": "Klient", <mask> "empty_response_status": "Tomt innhold", <mask> "show_all_filter_type": "Vis alle", <mask> "show_filtered_type": "Vis kun filtrerte", </s> + client: Update locales Squashed commit of the following: commit 6d743bb15974a85fedb004a3c639b1f849756e2d Merge: 1f6c5091 7d2c7a61 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 17 17:10:51 2020 +0300 Merge branch 'master' into feature/update_locales commit 1f6c50915e63c18834d63d3f8535d24a4e894647 Merge: 1a861a98 4df02714 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:23:08 2020 +0300 Merge branch 'master' into feature/update_locales commit 1a861a98326a749a347c184bb2b9aff663b3dd09 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:22:47 2020 +0300 Update locales commit 3f4850822c95b1147f39df939eca568f13b2c0dc Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 16:07:40 2020 +0300 Update locales commit 0f06bd8f188130e97394c8f20f27b66f263612cc Merge: 5abae336 38366ba8 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:59:22 2020 +0300 Merge branch 'master' into feature/update_locales commit 5abae33603e84dc410f77e7ec622314e85e03951 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:57:36 2020 +0300 Update locales commit 717455ecf42135077a7dae31281b1da0d89b27e3 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:45:15 2020 +0300 Rename label commit b399ef33eed3c0447d5c651d3b678d482dddbb5b Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:43:08 2020 +0300 Replace 'All responses' with 'All queries' commit 1f5a62a3d95906057c862b55d2ba91d67b346604 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 16:18:54 2020 +0300 + client: Update locales </s> remove label: 'show_all_responses', </s> add label: 'all_queries',
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c1e56c837b483873146a6d6218a15fe3c4b8cb7a
client/src/__locales/no.json
"choose_blocklist": "Izberite sezname za zaviranje", "choose_allowlist": "Izberite sezname dovoljenih",
<mask> "new_allowlist": "Nov seznam dovoljenih", <mask> "edit_blocklist": "Uredi seznam nedovoljenih", <mask> "edit_allowlist": "Uredi seznam dovoljenih", <mask> "enter_valid_blocklist": "Vnesite veljaven URL naslov seznama nedovoljenih.", <mask> "enter_valid_allowlist": "Vnesite veljaven URL naslov seznama dovoljenih.", <mask> "form_error_url_format": "Neveljaven format URL naslova", <mask> "form_error_url_or_path_format": "Neveljaven URL ali absolutna pot seznama", <mask> "custom_filter_rules": "Pravila filtriranja po meri", </s> + client: Update locales Squashed commit of the following: commit 6d743bb15974a85fedb004a3c639b1f849756e2d Merge: 1f6c5091 7d2c7a61 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 17 17:10:51 2020 +0300 Merge branch 'master' into feature/update_locales commit 1f6c50915e63c18834d63d3f8535d24a4e894647 Merge: 1a861a98 4df02714 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:23:08 2020 +0300 Merge branch 'master' into feature/update_locales commit 1a861a98326a749a347c184bb2b9aff663b3dd09 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:22:47 2020 +0300 Update locales commit 3f4850822c95b1147f39df939eca568f13b2c0dc Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 16:07:40 2020 +0300 Update locales commit 0f06bd8f188130e97394c8f20f27b66f263612cc Merge: 5abae336 38366ba8 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:59:22 2020 +0300 Merge branch 'master' into feature/update_locales commit 5abae33603e84dc410f77e7ec622314e85e03951 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:57:36 2020 +0300 Update locales commit 717455ecf42135077a7dae31281b1da0d89b27e3 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:45:15 2020 +0300 Rename label commit b399ef33eed3c0447d5c651d3b678d482dddbb5b Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:43:08 2020 +0300 Replace 'All responses' with 'All queries' commit 1f5a62a3d95906057c862b55d2ba91d67b346604 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 16:18:54 2020 +0300 + client: Update locales
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c1e56c837b483873146a6d6218a15fe3c4b8cb7a
client/src/__locales/sl.json
"choose_from_list": "Izberi s seznama", "add_custom_list": "Dodaj seznam po meri",
<mask> "form_enter_host": "Vnesite ime gostitelja", <mask> "filtered_custom_rules": "Filtrirano s pravili filtriranja po meri", <mask> "host_whitelisted": "Gostitelj je na seznamu dovoljenih", <mask> "check_ip": "IP naslovi: {{ip}}", <mask> "check_cname": "CNAME: {{cname}}", <mask> "check_reason": "Razlog: {{reason}}", <mask> "check_rule": "Pravilo: {{rule}}", </s> + client: Update locales Squashed commit of the following: commit 6d743bb15974a85fedb004a3c639b1f849756e2d Merge: 1f6c5091 7d2c7a61 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 17 17:10:51 2020 +0300 Merge branch 'master' into feature/update_locales commit 1f6c50915e63c18834d63d3f8535d24a4e894647 Merge: 1a861a98 4df02714 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:23:08 2020 +0300 Merge branch 'master' into feature/update_locales commit 1a861a98326a749a347c184bb2b9aff663b3dd09 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:22:47 2020 +0300 Update locales commit 3f4850822c95b1147f39df939eca568f13b2c0dc Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 16:07:40 2020 +0300 Update locales commit 0f06bd8f188130e97394c8f20f27b66f263612cc Merge: 5abae336 38366ba8 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:59:22 2020 +0300 Merge branch 'master' into feature/update_locales commit 5abae33603e84dc410f77e7ec622314e85e03951 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:57:36 2020 +0300 Update locales commit 717455ecf42135077a7dae31281b1da0d89b27e3 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:45:15 2020 +0300 Rename label commit b399ef33eed3c0447d5c651d3b678d482dddbb5b Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:43:08 2020 +0300 Replace 'All responses' with 'All queries' commit 1f5a62a3d95906057c862b55d2ba91d67b346604 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 16:18:54 2020 +0300 + client: Update locales </s> remove label: 'show_all_responses', </s> add label: 'all_queries',
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c1e56c837b483873146a6d6218a15fe3c4b8cb7a
client/src/__locales/sl.json
label: 'all_queries',
<mask> <mask> export const RESPONSE_FILTER = { <mask> ALL: { <mask> query: 'all', <mask> label: 'show_all_responses', <mask> }, <mask> FILTERED: { <mask> query: 'filtered', <mask> label: 'filtered', <mask> }, </s> + client: Update locales Squashed commit of the following: commit 6d743bb15974a85fedb004a3c639b1f849756e2d Merge: 1f6c5091 7d2c7a61 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 17 17:10:51 2020 +0300 Merge branch 'master' into feature/update_locales commit 1f6c50915e63c18834d63d3f8535d24a4e894647 Merge: 1a861a98 4df02714 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:23:08 2020 +0300 Merge branch 'master' into feature/update_locales commit 1a861a98326a749a347c184bb2b9aff663b3dd09 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jul 16 11:22:47 2020 +0300 Update locales commit 3f4850822c95b1147f39df939eca568f13b2c0dc Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 16:07:40 2020 +0300 Update locales commit 0f06bd8f188130e97394c8f20f27b66f263612cc Merge: 5abae336 38366ba8 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:59:22 2020 +0300 Merge branch 'master' into feature/update_locales commit 5abae33603e84dc410f77e7ec622314e85e03951 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jul 15 12:57:36 2020 +0300 Update locales commit 717455ecf42135077a7dae31281b1da0d89b27e3 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:45:15 2020 +0300 Rename label commit b399ef33eed3c0447d5c651d3b678d482dddbb5b Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 17:43:08 2020 +0300 Replace 'All responses' with 'All queries' commit 1f5a62a3d95906057c862b55d2ba91d67b346604 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jul 13 16:18:54 2020 +0300 + client: Update locales
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c1e56c837b483873146a6d6218a15fe3c4b8cb7a
client/src/helpers/constants.js
"time"
<mask> "runtime" <mask> "strconv" <mask> "strings" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/util" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/sysutil" <mask> <mask> "github.com/AdguardTeam/golibs/log" </s> Pull request: 2552 rm context.TODO() instances Merge in DNS/adguard-home from 2552-context to master Closes #2552. Squashed commit of the following: commit 3d1cef33da529f4611869c4a0f2f294a3c8afcaf Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:28:23 2021 +0300 all: fix docs commit d08c78cf4b96419b928e73c497768f40c9e47bc2 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:22:00 2021 +0300 all: doc changes commit c2814f4d0025be74f38299e7e66e7c0193b6c15f Merge: 100a1a09 44c7221a Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:12:55 2021 +0300 Merge branch 'master' into 2552-context commit 100a1a0957bc22bfaccb1693e6b9b1c5cb53ed13 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:10:03 2021 +0300 home: imp docs, fix naming commit 22717abe6c0e4c1016a53ff2fac1689d0762c462 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 18:14:07 2021 +0300 home: improve code quality commit 5c96f77a2b315e2c1ad4a11cc7a64f61bdba52a3 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Jan 25 20:28:51 2021 +0300 home: add docs commit 323fc013a57a5c06ec391003133b12f4eb2721cd Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Jan 25 14:50:11 2021 +0300 home: rm context.TODO() instances </s> remove // Reload - reload certificate file </s> add // Reload updates the configuration of TLSMod and restarts it. </s> remove // Start - start the module </s> add // Start updates the configuration of TLSMod and starts it. </s> remove cleanup() </s> add cleanup(context.Background()) </s> remove Context.web.Close() </s> add Context.web.Close(ctx)
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8
internal/home/controlinstall.go
// shutdownTimeout is the timeout for shutting HTTP server down operation. const shutdownTimeout = 5 * time.Second
<mask> dst.DNS.BindHost = src.DNS.BindHost <mask> dst.DNS.Port = src.DNS.Port <mask> } <mask> <mask> // Apply new configuration, start DNS server, restart Web server <mask> func (web *Web) handleInstallConfigure(w http.ResponseWriter, r *http.Request) { <mask> newSettings := applyConfigReq{} <mask> err := json.NewDecoder(r.Body).Decode(&newSettings) <mask> if err != nil { <mask> httpError(w, http.StatusBadRequest, "Failed to parse 'configure' JSON: %s", err) </s> Pull request: 2552 rm context.TODO() instances Merge in DNS/adguard-home from 2552-context to master Closes #2552. Squashed commit of the following: commit 3d1cef33da529f4611869c4a0f2f294a3c8afcaf Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:28:23 2021 +0300 all: fix docs commit d08c78cf4b96419b928e73c497768f40c9e47bc2 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:22:00 2021 +0300 all: doc changes commit c2814f4d0025be74f38299e7e66e7c0193b6c15f Merge: 100a1a09 44c7221a Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:12:55 2021 +0300 Merge branch 'master' into 2552-context commit 100a1a0957bc22bfaccb1693e6b9b1c5cb53ed13 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:10:03 2021 +0300 home: imp docs, fix naming commit 22717abe6c0e4c1016a53ff2fac1689d0762c462 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 18:14:07 2021 +0300 home: improve code quality commit 5c96f77a2b315e2c1ad4a11cc7a64f61bdba52a3 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Jan 25 20:28:51 2021 +0300 home: add docs commit 323fc013a57a5c06ec391003133b12f4eb2721cd Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Jan 25 14:50:11 2021 +0300 home: rm context.TODO() instances </s> remove // Perform an update procedure to the latest available version </s> add // handleUpdate performs an update to the latest available version procedure. </s> remove // StartMods - initialize and start DNS after installation </s> add // StartMods initializes and starts the DNS server after installation. </s> remove // Close - stop HTTP server, possibly waiting for all active connections to be closed func (web *Web) Close() { </s> add // Close gracefully shuts down the HTTP servers. func (web *Web) Close(ctx context.Context) { </s> remove // TLSConfigChanged - called when TLS configuration has changed func (web *Web) TLSConfigChanged(tlsConf tlsConfigSettings) { </s> add // TLSConfigChanged updates the TLS configuration and restarts the HTTPS server // if necessary. func (web *Web) TLSConfigChanged(ctx context.Context, tlsConf tlsConfigSettings) { </s> remove _ = web.httpsServer.server.Shutdown(context.TODO()) </s> add ctx, cancel := context.WithTimeout(ctx, shutdownTimeout) err = web.httpsServer.server.Shutdown(ctx) cancel() if err != nil { log.Debug("error while shutting down HTTP server: %s", err) }
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8
internal/home/controlinstall.go
// TODO(e.burkov): StartMods() should be put in a separate goroutine at // the moment we'll allow setting up TLS in the initial configuration or // the configuration itself will use HTTPS protocol, because the // underlying functions potentially restart the HTTPS server.
<mask> config.DNS.BindHost = newSettings.DNS.IP <mask> config.DNS.Port = newSettings.DNS.Port <mask> <mask> err = StartMods() <mask> if err != nil { <mask> Context.firstRun = true <mask> copyInstallSettings(&config, &curConfig) <mask> httpError(w, http.StatusInternalServerError, "%s", err) </s> Pull request: 2552 rm context.TODO() instances Merge in DNS/adguard-home from 2552-context to master Closes #2552. Squashed commit of the following: commit 3d1cef33da529f4611869c4a0f2f294a3c8afcaf Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:28:23 2021 +0300 all: fix docs commit d08c78cf4b96419b928e73c497768f40c9e47bc2 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:22:00 2021 +0300 all: doc changes commit c2814f4d0025be74f38299e7e66e7c0193b6c15f Merge: 100a1a09 44c7221a Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:12:55 2021 +0300 Merge branch 'master' into 2552-context commit 100a1a0957bc22bfaccb1693e6b9b1c5cb53ed13 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:10:03 2021 +0300 home: imp docs, fix naming commit 22717abe6c0e4c1016a53ff2fac1689d0762c462 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 18:14:07 2021 +0300 home: improve code quality commit 5c96f77a2b315e2c1ad4a11cc7a64f61bdba52a3 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Jan 25 20:28:51 2021 +0300 home: add docs commit 323fc013a57a5c06ec391003133b12f4eb2721cd Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Jan 25 14:50:11 2021 +0300 home: rm context.TODO() instances </s> remove if web.httpsServer.server != nil { _ = web.httpsServer.server.Shutdown(context.TODO()) } if web.httpServer != nil { _ = web.httpServer.Shutdown(context.TODO()) } if web.httpServerBeta != nil { _ = web.httpServerBeta.Shutdown(context.TODO()) </s> add shut := func(srv *http.Server) { if srv == nil { return } ctx, cancel := context.WithTimeout(ctx, shutdownTimeout) defer cancel() if err := srv.Shutdown(ctx); err != nil { log.Debug("error while shutting down HTTP server: %s", err) } </s> remove _ = web.httpsServer.server.Shutdown(context.TODO()) </s> add ctx, cancel := context.WithTimeout(ctx, shutdownTimeout) err = web.httpsServer.server.Shutdown(ctx) cancel() if err != nil { log.Debug("error while shutting down HTTP server: %s", err) } </s> remove // Perform an update procedure to the latest available version </s> add // handleUpdate performs an update to the latest available version procedure. </s> remove Context.web.Close() </s> add Context.web.Close(ctx)
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8
internal/home/controlinstall.go
// The Shutdown() method of (*http.Server) needs to be called in a // separate goroutine, because it waits until all requests are handled // and will be blocked by it's own caller.
<mask> if f, ok := w.(http.Flusher); ok { <mask> f.Flush() <mask> } <mask> <mask> // this needs to be done in a goroutine because Shutdown() is a blocking call, and it will block <mask> // until all requests are finished, and _we_ are inside a request right now, so it will block indefinitely <mask> if restartHTTP { <mask> go func() { <mask> _ = web.httpServer.Shutdown(context.TODO()) <mask> }() <mask> if web.httpServerBeta != nil { </s> Pull request: 2552 rm context.TODO() instances Merge in DNS/adguard-home from 2552-context to master Closes #2552. Squashed commit of the following: commit 3d1cef33da529f4611869c4a0f2f294a3c8afcaf Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:28:23 2021 +0300 all: fix docs commit d08c78cf4b96419b928e73c497768f40c9e47bc2 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:22:00 2021 +0300 all: doc changes commit c2814f4d0025be74f38299e7e66e7c0193b6c15f Merge: 100a1a09 44c7221a Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:12:55 2021 +0300 Merge branch 'master' into 2552-context commit 100a1a0957bc22bfaccb1693e6b9b1c5cb53ed13 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:10:03 2021 +0300 home: imp docs, fix naming commit 22717abe6c0e4c1016a53ff2fac1689d0762c462 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 18:14:07 2021 +0300 home: improve code quality commit 5c96f77a2b315e2c1ad4a11cc7a64f61bdba52a3 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Jan 25 20:28:51 2021 +0300 home: add docs commit 323fc013a57a5c06ec391003133b12f4eb2721cd Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Jan 25 14:50:11 2021 +0300 home: rm context.TODO() instances </s> remove Context.web.TLSConfigChanged(data) </s> add Context.web.TLSConfigChanged(context.Background(), data) </s> remove // this needs to be done in a goroutine because Shutdown() is a blocking call, and it will block // until all requests are finished, and _we_ are inside a request right now, so it will block indefinitely </s> add // The background context is used because the TLSConfigChanged wraps // context with timeout on its own and shuts down the server, which // handles current request. It is also should be done in a separate // goroutine due to the same reason. </s> remove go func() { _ = web.httpServer.Shutdown(context.TODO()) }() </s> add ctx, cancel := context.WithTimeout(context.Background(), shutdownTimeout) shut := func(srv *http.Server) { defer cancel() err := srv.Shutdown(ctx) if err != nil { log.Debug("error while shutting down HTTP server: %s", err) } } go shut(web.httpServer) </s> remove go finishUpdate() </s> add // The background context is used because the underlying functions wrap // it with timeout and shut down the server, which handles current // request. It also should be done in a separate goroutine due to the // same reason. go func() { finishUpdate(context.Background()) }() </s> remove go func() { _ = web.httpServerBeta.Shutdown(context.TODO()) }() </s> add go shut(web.httpServerBeta)
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8
internal/home/controlinstall.go
ctx, cancel := context.WithTimeout(context.Background(), shutdownTimeout) shut := func(srv *http.Server) { defer cancel() err := srv.Shutdown(ctx) if err != nil { log.Debug("error while shutting down HTTP server: %s", err) } } go shut(web.httpServer)
<mask> <mask> // this needs to be done in a goroutine because Shutdown() is a blocking call, and it will block <mask> // until all requests are finished, and _we_ are inside a request right now, so it will block indefinitely <mask> if restartHTTP { <mask> go func() { <mask> _ = web.httpServer.Shutdown(context.TODO()) <mask> }() <mask> if web.httpServerBeta != nil { <mask> go func() { <mask> _ = web.httpServerBeta.Shutdown(context.TODO()) <mask> }() <mask> } </s> Pull request: 2552 rm context.TODO() instances Merge in DNS/adguard-home from 2552-context to master Closes #2552. Squashed commit of the following: commit 3d1cef33da529f4611869c4a0f2f294a3c8afcaf Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:28:23 2021 +0300 all: fix docs commit d08c78cf4b96419b928e73c497768f40c9e47bc2 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:22:00 2021 +0300 all: doc changes commit c2814f4d0025be74f38299e7e66e7c0193b6c15f Merge: 100a1a09 44c7221a Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:12:55 2021 +0300 Merge branch 'master' into 2552-context commit 100a1a0957bc22bfaccb1693e6b9b1c5cb53ed13 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:10:03 2021 +0300 home: imp docs, fix naming commit 22717abe6c0e4c1016a53ff2fac1689d0762c462 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 18:14:07 2021 +0300 home: improve code quality commit 5c96f77a2b315e2c1ad4a11cc7a64f61bdba52a3 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Jan 25 20:28:51 2021 +0300 home: add docs commit 323fc013a57a5c06ec391003133b12f4eb2721cd Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Jan 25 14:50:11 2021 +0300 home: rm context.TODO() instances </s> remove // this needs to be done in a goroutine because Shutdown() is a blocking call, and it will block // until all requests are finished, and _we_ are inside a request right now, so it will block indefinitely </s> add // The Shutdown() method of (*http.Server) needs to be called in a // separate goroutine, because it waits until all requests are handled // and will be blocked by it's own caller. </s> remove Context.web.TLSConfigChanged(data) </s> add Context.web.TLSConfigChanged(context.Background(), data) </s> remove // this needs to be done in a goroutine because Shutdown() is a blocking call, and it will block // until all requests are finished, and _we_ are inside a request right now, so it will block indefinitely </s> add // The background context is used because the TLSConfigChanged wraps // context with timeout on its own and shuts down the server, which // handles current request. It is also should be done in a separate // goroutine due to the same reason. </s> remove go func() { _ = web.httpServerBeta.Shutdown(context.TODO()) }() </s> add go shut(web.httpServerBeta) </s> remove go finishUpdate() </s> add // The background context is used because the underlying functions wrap // it with timeout and shut down the server, which handles current // request. It also should be done in a separate goroutine due to the // same reason. go func() { finishUpdate(context.Background()) }()
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8
internal/home/controlinstall.go
go shut(web.httpServerBeta)
<mask> go func() { <mask> _ = web.httpServer.Shutdown(context.TODO()) <mask> }() <mask> if web.httpServerBeta != nil { <mask> go func() { <mask> _ = web.httpServerBeta.Shutdown(context.TODO()) <mask> }() <mask> } <mask> } <mask> } <mask> <mask> func (web *Web) registerInstallHandlers() { </s> Pull request: 2552 rm context.TODO() instances Merge in DNS/adguard-home from 2552-context to master Closes #2552. Squashed commit of the following: commit 3d1cef33da529f4611869c4a0f2f294a3c8afcaf Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:28:23 2021 +0300 all: fix docs commit d08c78cf4b96419b928e73c497768f40c9e47bc2 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:22:00 2021 +0300 all: doc changes commit c2814f4d0025be74f38299e7e66e7c0193b6c15f Merge: 100a1a09 44c7221a Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:12:55 2021 +0300 Merge branch 'master' into 2552-context commit 100a1a0957bc22bfaccb1693e6b9b1c5cb53ed13 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:10:03 2021 +0300 home: imp docs, fix naming commit 22717abe6c0e4c1016a53ff2fac1689d0762c462 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 18:14:07 2021 +0300 home: improve code quality commit 5c96f77a2b315e2c1ad4a11cc7a64f61bdba52a3 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Jan 25 20:28:51 2021 +0300 home: add docs commit 323fc013a57a5c06ec391003133b12f4eb2721cd Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Jan 25 14:50:11 2021 +0300 home: rm context.TODO() instances </s> remove go func() { _ = web.httpServer.Shutdown(context.TODO()) }() </s> add ctx, cancel := context.WithTimeout(context.Background(), shutdownTimeout) shut := func(srv *http.Server) { defer cancel() err := srv.Shutdown(ctx) if err != nil { log.Debug("error while shutting down HTTP server: %s", err) } } go shut(web.httpServer) </s> remove if web.httpsServer.server != nil { _ = web.httpsServer.server.Shutdown(context.TODO()) } if web.httpServer != nil { _ = web.httpServer.Shutdown(context.TODO()) } if web.httpServerBeta != nil { _ = web.httpServerBeta.Shutdown(context.TODO()) </s> add shut := func(srv *http.Server) { if srv == nil { return } ctx, cancel := context.WithTimeout(ctx, shutdownTimeout) defer cancel() if err := srv.Shutdown(ctx); err != nil { log.Debug("error while shutting down HTTP server: %s", err) } </s> remove // this needs to be done in a goroutine because Shutdown() is a blocking call, and it will block // until all requests are finished, and _we_ are inside a request right now, so it will block indefinitely </s> add // The Shutdown() method of (*http.Server) needs to be called in a // separate goroutine, because it waits until all requests are handled // and will be blocked by it's own caller. </s> remove Context.web.TLSConfigChanged(data) </s> add Context.web.TLSConfigChanged(context.Background(), data) </s> remove // Close - stop HTTP server, possibly waiting for all active connections to be closed func (web *Web) Close() { </s> add // Close gracefully shuts down the HTTP servers. func (web *Web) Close(ctx context.Context) {
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8
internal/home/controlinstall.go
"context"
<mask> <mask> import ( <mask> "encoding/json" <mask> "errors" <mask> "net/http" <mask> "os" <mask> "os/exec" <mask> "path/filepath" </s> Pull request: 2552 rm context.TODO() instances Merge in DNS/adguard-home from 2552-context to master Closes #2552. Squashed commit of the following: commit 3d1cef33da529f4611869c4a0f2f294a3c8afcaf Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:28:23 2021 +0300 all: fix docs commit d08c78cf4b96419b928e73c497768f40c9e47bc2 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:22:00 2021 +0300 all: doc changes commit c2814f4d0025be74f38299e7e66e7c0193b6c15f Merge: 100a1a09 44c7221a Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:12:55 2021 +0300 Merge branch 'master' into 2552-context commit 100a1a0957bc22bfaccb1693e6b9b1c5cb53ed13 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 19:10:03 2021 +0300 home: imp docs, fix naming commit 22717abe6c0e4c1016a53ff2fac1689d0762c462 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jan 26 18:14:07 2021 +0300 home: improve code quality commit 5c96f77a2b315e2c1ad4a11cc7a64f61bdba52a3 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Jan 25 20:28:51 2021 +0300 home: add docs commit 323fc013a57a5c06ec391003133b12f4eb2721cd Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Jan 25 14:50:11 2021 +0300 home: rm context.TODO() instances </s> remove cleanup() </s> add cleanup(ctx) </s> remove Context.web.TLSConfigChanged(tlsConf) </s> add // The background context is used because the TLSConfigChanged wraps // context with timeout on its own and shuts down the server, which // handles current request. Context.web.TLSConfigChanged(context.Background(), tlsConf) </s> remove // Start - start the module </s> add // Start updates the configuration of TLSMod and starts it.
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8
internal/home/controlupdate.go