diff --git a/README.md b/README.md index 5de1ed5..e12d5ed 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ user = "coolUser" # Main user for the image # if re-used, is compatible with the version of aeacus being used. # # You can print your version of aeacus with ./aeacus version. -version = "2.1.0" +version = "2.1.1" [[check]] message = "Removed insecure sudoers rule" diff --git a/checks.go b/checks.go index 9f60733..e676430 100644 --- a/checks.go +++ b/checks.go @@ -123,13 +123,13 @@ func runCheck(cond cond) bool { return false } condFunc = cond.Type - if cond.Type[len(cond.Type)-len(not):len(cond.Type)] == not { + if condFunc[len(condFunc)-len(not):] == not { negation = true - condFunc = cond.Type[:len(cond.Type)-len(not)] + condFunc = condFunc[:len(condFunc)-len(not)] } - if cond.Type[len(cond.Type)-len(regex):len(cond.Type)] == regex { + if condFunc[len(condFunc)-len(regex):] == regex { cond.regex = true - condFunc = cond.Type[:len(cond.Type)-len(regex)] + condFunc = condFunc[:len(condFunc)-len(regex)] } // Catch panic if check type doesn't exist diff --git a/docs/examples/linux-remote.conf b/docs/examples/linux-remote.conf index 230fcf0..22f15e9 100644 --- a/docs/examples/linux-remote.conf +++ b/docs/examples/linux-remote.conf @@ -2,7 +2,7 @@ name = "linux-remote" # Name of image title = "A Practice Round" # Title of Round user = "sha" # Main user, used for sending notifications os = "Ubuntu 20.04" # Operating system, used for README -version = "2.1.0" # The version of aeacus you're using +version = "2.1.1" # The version of aeacus you're using # If remote is specified, aeacus will report its score and refuse to score if # the remote server does not accept its messages and Team ID (unless "local" is diff --git a/utility.go b/utility.go index d6355b5..89cdf68 100644 --- a/utility.go +++ b/utility.go @@ -10,7 +10,7 @@ import ( ) const ( - version = "2.1.0" + version = "2.1.1" ) var (