Skip to content

Commit ebaab89

Browse files
Formatting updates
1 parent dd8b7a4 commit ebaab89

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

python/ql/lib/semmle/python/Frameworks.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ private import semmle.python.frameworks.Asyncpg
1717
private import semmle.python.frameworks.Baize
1818
private import semmle.python.frameworks.Bottle
1919
private import semmle.python.frameworks.BSon
20-
private import semmle.python.frameworks.Bottle
2120
private import semmle.python.frameworks.CassandraDriver
2221
private import semmle.python.frameworks.Chameleon
2322
private import semmle.python.frameworks.Cherrypy

python/ql/src/Security/CWE-074/TemplateInjection.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ import TemplateInjectionFlow::PathGraph
1616

1717
from TemplateInjectionFlow::PathNode source, TemplateInjectionFlow::PathNode sink
1818
where TemplateInjectionFlow::flowPath(source, sink)
19-
select sink.getNode(), source, sink, "This template construction depends on a $@.", source.getNode(),
20-
"user-provided value"
19+
select sink.getNode(), source, sink, "This template construction depends on a $@.",
20+
source.getNode(), "user-provided value"

python/ql/test/library-tests/frameworks/django-v2-v3/template_test.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
from django.urls import path
33
from django.http.response import HttpResponse
44

5-
def a(request): # $requestHandler
6-
t = Template("abc").render() # $templateConstruction="abc"
7-
return HttpResponse(t) # $HttpResponse
5+
def a(request): # $ requestHandler
6+
t = Template("abc").render() # $ templateConstruction="abc"
7+
return HttpResponse(t) # $ HttpResponse
88

9-
def b(request): # $requestHandler
9+
def b(request): # $ requestHandler
1010
# This case is not currently supported
11-
t = django.template.engines["django"].from_string("abc") # $MISSING:templateConstruction="abc"
12-
return HttpResponse(t) # $HttpResponse
11+
t = django.template.engines["django"].from_string("abc") # $ MISSING:templateConstruction="abc"
12+
return HttpResponse(t) # $ HttpResponse
1313

1414
urlpatterns = [
1515
path("a", a), # $ routeSetup="a"

python/ql/test/library-tests/frameworks/flask/template_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
app = Flask(__name__)
33

44
@app.route("/a") # $routeSetup="/a"
5-
def a(): # $requestHandler
5+
def a(): # $ requestHandler
66
r = render_template_string("abc") # $ templateConstruction="abc"
77
return r # $ HttpResponse
88

99
@app.route("/b") # $routeSetup="/b"
10-
def b(): # $requestHandler
10+
def b(): # $ requestHandler
1111
s = stream_template_string("abc") # $ templateConstruction="abc"
1212
r = Response(stream_with_context(s)) # $ HttpResponse
1313
return r # $ HttpResponse

python/ql/test/library-tests/frameworks/jinja2/template_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ def test():
77
t = Template("abc") # $ templateConstruction="abc"
88

99
env2 = SandboxedEnvironment()
10-
t = env.from_string("abc") # No result as we don't model SandboxedEnvironment. We may wish to instead specifically model it as NOT vulnerable to template injection vulnerabilities.
10+
t = env2.from_string("abc") # No result as we don't model SandboxedEnvironment. We may wish to instead specifically model it as NOT vulnerable to template injection vulnerabilities.
1111
return t

0 commit comments

Comments
 (0)