-
Christian Boltz authored
... File "/home/cb/apparmor/HEAD-CLEAN/utils/apparmor/severity.py", line 147, in handle_variable_rank variable = regex_variable.search(resource).groups()[0] AttributeError: 'NoneType' object has no attribute 'groups' handle_variable_rank() checked with if '@' in resource: and if it finds it, expects it can match a variable, which means @{.....} If a filename contains a @ this fails. The patch fixes the if condition so that it does a regex match. It also adds two testcases for filenames containing @ to make sure they don't cause a crash and result in the exptected severity rank. Acked-by: Steve Beattie <steve@nxnw.org>
7e84f4ef