Fix swapped out arguments in substring check

*example.com* was matching ample.com, not xxxexample.comxxx

Fixes #14
This commit is contained in:
Frank Denis 2018-01-20 17:11:02 +01:00
parent 4f42dd01a4
commit 5dd08fe56b
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ func (plugin *PluginBlockName) Eval(pluginsState *PluginsState, msg *dns.Msg) er
}
if !reject {
for _, substring := range plugin.blockedSubstrings {
if strings.Contains(substring, qName) {
if strings.Contains(qName, substring) {
reject, reason = true, "*"+substring+"*"
break
}