diff --git a/core/plugins/apache.py b/core/plugins/apache.py index 0cc0d77..bdc68ac 100644 --- a/core/plugins/apache.py +++ b/core/plugins/apache.py @@ -132,7 +132,7 @@ class Apache: else: self._reports["signature"]["audit"] = False - self._reports["signature"]["audit"] = \ + self._reports["signature"]["msg"] = \ f"The file {path} do not exist" def _parsingApacheConfigForSignature(self, fdata) -> dict: @@ -184,7 +184,7 @@ class Apache: self._parsingApacheConfig(fdata) else: self._reports["indexes"]["audit"] = False - self._reports["indexes"]["audit"] = \ + self._reports["indexes"]["msg"] = \ f"The file {path} do not exist" def _parsingApacheConfig(self, fdata) -> dict: @@ -240,7 +240,7 @@ class Apache: ) if grOption: optsFound.append(opt) - + # We can check if you found the options if len(optsFound) == len(self._indexes['options']): report["directories"][directory]["result"] = "success" @@ -251,6 +251,7 @@ class Apache: report["directories"][directory]["options"].append( f"{opt} is not removed. You should disable it" ) + optsFound.clear() report["audit"] = True report["description"] = self._indexes["description"] diff --git a/reports/templates/apache-signature.html.j2 b/reports/templates/apache-signature.html.j2 index 970b174..15e1d66 100644 --- a/reports/templates/apache-signature.html.j2 +++ b/reports/templates/apache-signature.html.j2 @@ -34,5 +34,5 @@ {% endfor %} {% else %} - {{ data['apache']['msg'] }} + {{ data['apache']['signature']['msg'] }} {% endif %}