src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.djangoXssVulnerability.html

branch
eric7
changeset 10479
856476537696
parent 10259
b51dfacef37f
child 10684
58c7f23ae1cb
equal deleted inserted replaced
10478:de9106c55c3d 10479:856476537696
5 <link rel="stylesheet" href="styles.css"> 5 <link rel="stylesheet" href="styles.css">
6 </head> 6 </head>
7 <body> 7 <body>
8 <a NAME="top" ID="top"></a> 8 <a NAME="top" ID="top"></a>
9 <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.djangoXssVulnerability</h1> 9 <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.djangoXssVulnerability</h1>
10
11 <p> 10 <p>
12 Module implementing checks for potential XSS vulnerability. 11 Module implementing checks for potential XSS vulnerability.
13 </p> 12 </p>
13
14 <h3>Global Attributes</h3> 14 <h3>Global Attributes</h3>
15
16 <table> 15 <table>
17 <tr><td>None</td></tr> 16 <tr><td>None</td></tr>
18 </table> 17 </table>
18
19 <h3>Classes</h3> 19 <h3>Classes</h3>
20 20 <table>
21 <table>
22
23 <tr> 21 <tr>
24 <td><a href="#DeepAssignation">DeepAssignation</a></td> 22 <td><a href="#DeepAssignation">DeepAssignation</a></td>
25 <td>Class to perform a deep analysis of an assign.</td> 23 <td>Class to perform a deep analysis of an assign.</td>
26 </tr> 24 </tr>
27 </table> 25 </table>
26
28 <h3>Functions</h3> 27 <h3>Functions</h3>
29 28 <table>
30 <table>
31
32 <tr> 29 <tr>
33 <td><a href="#checkDjangoXssVulnerability">checkDjangoXssVulnerability</a></td> 30 <td><a href="#checkDjangoXssVulnerability">checkDjangoXssVulnerability</a></td>
34 <td>Function to check for potential XSS vulnerability.</td> 31 <td>Function to check for potential XSS vulnerability.</td>
35 </tr> 32 </tr>
36 <tr> 33 <tr>
52 <tr> 49 <tr>
53 <td><a href="#transform2call">transform2call</a></td> 50 <td><a href="#transform2call">transform2call</a></td>
54 <td>Function to transform a variable node to a call node.</td> 51 <td>Function to transform a variable node to a call node.</td>
55 </tr> 52 </tr>
56 </table> 53 </table>
54
57 <hr /> 55 <hr />
58 <hr /> 56 <hr />
59 <a NAME="DeepAssignation" ID="DeepAssignation"></a> 57 <a NAME="DeepAssignation" ID="DeepAssignation"></a>
60 <h2>DeepAssignation</h2> 58 <h2>DeepAssignation</h2>
61
62 <p> 59 <p>
63 Class to perform a deep analysis of an assign. 60 Class to perform a deep analysis of an assign.
64 </p> 61 </p>
62
65 <h3>Derived from</h3> 63 <h3>Derived from</h3>
66 None 64 None
67 <h3>Class Attributes</h3> 65 <h3>Class Attributes</h3>
68
69 <table> 66 <table>
70 <tr><td>None</td></tr> 67 <tr><td>None</td></tr>
71 </table> 68 </table>
69
72 <h3>Class Methods</h3> 70 <h3>Class Methods</h3>
73
74 <table> 71 <table>
75 <tr><td>None</td></tr> 72 <tr><td>None</td></tr>
76 </table> 73 </table>
74
77 <h3>Methods</h3> 75 <h3>Methods</h3>
78 76 <table>
79 <table>
80
81 <tr> 77 <tr>
82 <td><a href="#DeepAssignation.__init__">DeepAssignation</a></td> 78 <td><a href="#DeepAssignation.__init__">DeepAssignation</a></td>
83 <td>Constructor</td> 79 <td>Constructor</td>
84 </tr> 80 </tr>
85 <tr> 81 <tr>
89 <tr> 85 <tr>
90 <td><a href="#DeepAssignation.isAssignedIn">isAssignedIn</a></td> 86 <td><a href="#DeepAssignation.isAssignedIn">isAssignedIn</a></td>
91 <td>Public method to check, if the variable is assigned to.</td> 87 <td>Public method to check, if the variable is assigned to.</td>
92 </tr> 88 </tr>
93 </table> 89 </table>
90
94 <h3>Static Methods</h3> 91 <h3>Static Methods</h3>
95
96 <table> 92 <table>
97 <tr><td>None</td></tr> 93 <tr><td>None</td></tr>
98 </table> 94 </table>
95
99 96
100 <a NAME="DeepAssignation.__init__" ID="DeepAssignation.__init__"></a> 97 <a NAME="DeepAssignation.__init__" ID="DeepAssignation.__init__"></a>
101 <h4>DeepAssignation (Constructor)</h4> 98 <h4>DeepAssignation (Constructor)</h4>
102 <b>DeepAssignation</b>(<i>varName, ignoreNodes=None</i>) 99 <b>DeepAssignation</b>(<i>varName, ignoreNodes=None</i>)
103
104 <p> 100 <p>
105 Constructor 101 Constructor
106 </p> 102 </p>
103
107 <dl> 104 <dl>
108 105
109 <dt><i>varName</i> (str)</dt> 106 <dt><i>varName</i> (str)</dt>
110 <dd> 107 <dd>
111 name of the variable 108 name of the variable
116 </dd> 113 </dd>
117 </dl> 114 </dl>
118 <a NAME="DeepAssignation.isAssigned" ID="DeepAssignation.isAssigned"></a> 115 <a NAME="DeepAssignation.isAssigned" ID="DeepAssignation.isAssigned"></a>
119 <h4>DeepAssignation.isAssigned</h4> 116 <h4>DeepAssignation.isAssigned</h4>
120 <b>isAssigned</b>(<i>node</i>) 117 <b>isAssigned</b>(<i>node</i>)
121
122 <p> 118 <p>
123 Public method to check assignment against a given node. 119 Public method to check assignment against a given node.
124 </p> 120 </p>
121
125 <dl> 122 <dl>
126 123
127 <dt><i>node</i> (ast.AST)</dt> 124 <dt><i>node</i> (ast.AST)</dt>
128 <dd> 125 <dd>
129 node to check against 126 node to check against
142 </dd> 139 </dd>
143 </dl> 140 </dl>
144 <a NAME="DeepAssignation.isAssignedIn" ID="DeepAssignation.isAssignedIn"></a> 141 <a NAME="DeepAssignation.isAssignedIn" ID="DeepAssignation.isAssignedIn"></a>
145 <h4>DeepAssignation.isAssignedIn</h4> 142 <h4>DeepAssignation.isAssignedIn</h4>
146 <b>isAssignedIn</b>(<i>items</i>) 143 <b>isAssignedIn</b>(<i>items</i>)
147
148 <p> 144 <p>
149 Public method to check, if the variable is assigned to. 145 Public method to check, if the variable is assigned to.
150 </p> 146 </p>
147
151 <dl> 148 <dl>
152 149
153 <dt><i>items</i> (list of ast.AST)</dt> 150 <dt><i>items</i> (list of ast.AST)</dt>
154 <dd> 151 <dd>
155 list of nodes to check against 152 list of nodes to check against
171 <hr /> 168 <hr />
172 <hr /> 169 <hr />
173 <a NAME="checkDjangoXssVulnerability" ID="checkDjangoXssVulnerability"></a> 170 <a NAME="checkDjangoXssVulnerability" ID="checkDjangoXssVulnerability"></a>
174 <h2>checkDjangoXssVulnerability</h2> 171 <h2>checkDjangoXssVulnerability</h2>
175 <b>checkDjangoXssVulnerability</b>(<i>reportError, context, config</i>) 172 <b>checkDjangoXssVulnerability</b>(<i>reportError, context, config</i>)
176
177 <p> 173 <p>
178 Function to check for potential XSS vulnerability. 174 Function to check for potential XSS vulnerability.
179 </p> 175 </p>
176
180 <dl> 177 <dl>
181 178
182 <dt><i>reportError</i> (func)</dt> 179 <dt><i>reportError</i> (func)</dt>
183 <dd> 180 <dd>
184 function to be used to report errors 181 function to be used to report errors
196 <hr /> 193 <hr />
197 <hr /> 194 <hr />
198 <a NAME="checkPotentialRisk" ID="checkPotentialRisk"></a> 195 <a NAME="checkPotentialRisk" ID="checkPotentialRisk"></a>
199 <h2>checkPotentialRisk</h2> 196 <h2>checkPotentialRisk</h2>
200 <b>checkPotentialRisk</b>(<i>reportError, node</i>) 197 <b>checkPotentialRisk</b>(<i>reportError, node</i>)
201
202 <p> 198 <p>
203 Function to check a given node for a potential XSS vulnerability. 199 Function to check a given node for a potential XSS vulnerability.
204 </p> 200 </p>
201
205 <dl> 202 <dl>
206 203
207 <dt><i>reportError</i> (func)</dt> 204 <dt><i>reportError</i> (func)</dt>
208 <dd> 205 <dd>
209 function to be used to report errors 206 function to be used to report errors
217 <hr /> 214 <hr />
218 <hr /> 215 <hr />
219 <a NAME="evaluateCall" ID="evaluateCall"></a> 216 <a NAME="evaluateCall" ID="evaluateCall"></a>
220 <h2>evaluateCall</h2> 217 <h2>evaluateCall</h2>
221 <b>evaluateCall</b>(<i>call, parent, ignoreNodes=None</i>) 218 <b>evaluateCall</b>(<i>call, parent, ignoreNodes=None</i>)
222
223 <p> 219 <p>
224 Function to evaluate a call node for potential XSS vulnerability. 220 Function to evaluate a call node for potential XSS vulnerability.
225 </p> 221 </p>
222
226 <dl> 223 <dl>
227 224
228 <dt><i>call</i> (ast.Call)</dt> 225 <dt><i>call</i> (ast.Call)</dt>
229 <dd> 226 <dd>
230 call node to be checked 227 call node to be checked
254 <hr /> 251 <hr />
255 <hr /> 252 <hr />
256 <a NAME="evaluateVar" ID="evaluateVar"></a> 253 <a NAME="evaluateVar" ID="evaluateVar"></a>
257 <h2>evaluateVar</h2> 254 <h2>evaluateVar</h2>
258 <b>evaluateVar</b>(<i>xssVar, parent, until, ignoreNodes=None</i>) 255 <b>evaluateVar</b>(<i>xssVar, parent, until, ignoreNodes=None</i>)
259
260 <p> 256 <p>
261 Function to evaluate a variable node for potential XSS vulnerability. 257 Function to evaluate a variable node for potential XSS vulnerability.
262 </p> 258 </p>
259
263 <dl> 260 <dl>
264 261
265 <dt><i>xssVar</i> (ast.Name)</dt> 262 <dt><i>xssVar</i> (ast.Name)</dt>
266 <dd> 263 <dd>
267 variable node to be checked 264 variable node to be checked
295 <hr /> 292 <hr />
296 <hr /> 293 <hr />
297 <a NAME="getChecks" ID="getChecks"></a> 294 <a NAME="getChecks" ID="getChecks"></a>
298 <h2>getChecks</h2> 295 <h2>getChecks</h2>
299 <b>getChecks</b>(<i></i>) 296 <b>getChecks</b>(<i></i>)
300
301 <p> 297 <p>
302 Public method to get a dictionary with checks handled by this module. 298 Public method to get a dictionary with checks handled by this module.
303 </p> 299 </p>
300
304 <dl> 301 <dl>
305 <dt>Return:</dt> 302 <dt>Return:</dt>
306 <dd> 303 <dd>
307 dictionary containing checker lists containing checker function and 304 dictionary containing checker lists containing checker function and
308 list of codes 305 list of codes
318 <hr /> 315 <hr />
319 <hr /> 316 <hr />
320 <a NAME="transform2call" ID="transform2call"></a> 317 <a NAME="transform2call" ID="transform2call"></a>
321 <h2>transform2call</h2> 318 <h2>transform2call</h2>
322 <b>transform2call</b>(<i>var</i>) 319 <b>transform2call</b>(<i>var</i>)
323
324 <p> 320 <p>
325 Function to transform a variable node to a call node. 321 Function to transform a variable node to a call node.
326 </p> 322 </p>
323
327 <dl> 324 <dl>
328 325
329 <dt><i>var</i> (ast.BinOp)</dt> 326 <dt><i>var</i> (ast.BinOp)</dt>
330 <dd> 327 <dd>
331 variable node 328 variable node

eric ide

mercurial