src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/injectionShell.py

branch
eric7
changeset 10169
0f70a4ef4592
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/injectionShell.py	Tue Aug 29 16:55:01 2023 +0200
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/injectionShell.py	Tue Aug 29 16:55:18 2023 +0200
@@ -80,7 +80,7 @@
             if key.arg == "shell":
                 val = key.value
                 if AstUtilities.isNumber(val):
-                    result = bool(val.n)
+                    result = bool(val.value)
                 elif isinstance(val, ast.List):
                     result = bool(val.elts)
                 elif isinstance(val, ast.Dict):
@@ -289,7 +289,7 @@
             node = node.elts[0]
 
         # make sure the param is a string literal and not a var name
-        if AstUtilities.isString(node) and not fullPathMatchRe.match(node.s):
+        if AstUtilities.isString(node) and not fullPathMatchRe.match(node.value):
             reportError(
                 context.node.lineno - 1,
                 context.node.col_offset,

eric ide

mercurial