33 (checkDjangoXssVulnerability, ("S703",)), |
33 (checkDjangoXssVulnerability, ("S703",)), |
34 ], |
34 ], |
35 } |
35 } |
36 |
36 |
37 |
37 |
38 def checkDjangoXssVulnerability(reportError, context, config): # noqa: U100 |
38 def checkDjangoXssVulnerability(reportError, context, _config): |
39 """ |
39 """ |
40 Function to check for potential XSS vulnerability. |
40 Function to check for potential XSS vulnerability. |
41 |
41 |
42 @param reportError function to be used to report errors |
42 @param reportError function to be used to report errors |
43 @type func |
43 @type func |
44 @param context security context object |
44 @param context security context object |
45 @type SecurityContext |
45 @type SecurityContext |
46 @param config dictionary with configuration data |
46 @param _config dictionary with configuration data (unused) |
47 @type dict |
47 @type dict |
48 """ |
48 """ |
49 if context.isModuleImportedLike("django.utils.safestring"): |
49 if context.isModuleImportedLike("django.utils.safestring"): |
50 affectedFunctions = [ |
50 affectedFunctions = [ |
51 "mark_safe", |
51 "mark_safe", |