pe_test.go | 5 +++++ validators.go | 2 +- diff --git a/pe_test.go b/pe_test.go index 20999277318755174e7fede997d55104cb16c09d..58c138fc877e173254de4f87f73afeba02df93a3 100644 --- a/pe_test.go +++ b/pe_test.go @@ -18,6 +18,11 @@ if output[0] != ".gitignore" { t.Errorf("Doesnt match hidden files", output) } + output = GetAllMatches(" this.user ") + if len(output) != 0 { + t.Errorf("Matches this.user", output) + } + output = GetAllMatches(" mail@mail.com ") if len(output) != 0 { t.Errorf("Matches email adresses", output) diff --git a/validators.go b/validators.go index 2ed2a880065e7d97e9f5d6e64b3c724edeeb71f4..b0501d6839111588ad0bfb4903b597ad41a0c77e 100644 --- a/validators.go +++ b/validators.go @@ -67,7 +67,7 @@ return false } func containsInvalidString(input string) bool { - invalidStrings := []string{"(", ")", "and/or", "origin/", "{", "}", "<", ">", "$", "*"} + invalidStrings := []string{"(", ")", "and/or", "origin/", "{", "}", "<", ">", "$", "*", "this."} for _, s := range invalidStrings { if strings.Contains(input, s) { return true