File tree Expand file tree Collapse file tree 4 files changed +39
-2
lines changed
python/ql/test/library-tests/web/flask Expand file tree Collapse file tree 4 files changed +39
-2
lines changed Original file line number Diff line number Diff line change 66| test.py:41:26:41:53 | flask.response.argument | externally controlled string |
77| test.py:46:12:46:62 | flask.routed.response | externally controlled string |
88| test.py:46:26:46:61 | flask.response.argument | externally controlled string |
9+ | test.py:50:12:50:48 | flask.routed.response | externally controlled string |
10+ | test.py:50:26:50:47 | flask.response.argument | externally controlled string |
11+ | test.py:54:12:54:53 | flask.routed.response | externally controlled string |
12+ | test.py:54:26:54:52 | flask.response.argument | externally controlled string |
13+ | test.py:60:12:60:62 | flask.routed.response | externally controlled string |
14+ | test.py:60:26:60:61 | flask.response.argument | externally controlled string |
15+ | test.py:64:12:64:58 | flask.routed.response | externally controlled string |
16+ | test.py:64:26:64:57 | flask.response.argument | externally controlled string |
Original file line number Diff line number Diff line change 1- | / | Function hello |
1+ | / | Function hello_world |
2+ | /complex/<string(length=2):lang_code> | Function complex |
23| /dangerous | Function dangerous |
34| /dangerous-with-cfg-split | Function dangerous2 |
5+ | /foo/<path:subpath> | Function foo |
6+ | /hello/<name> | Function hello |
7+ | /multiple/bar/<bar> | Function multiple |
48| /safe | Function safe |
59| /the/ | Function get |
610| /unsafe | Function unsafe |
Original file line number Diff line number Diff line change 1515| test.py:45 | Attribute() | externally controlled string |
1616| test.py:46 | first_name | externally controlled string |
1717| test.py:46 | make_response() | flask.Response |
18+ | test.py:50 | make_response() | flask.Response |
19+ | test.py:54 | make_response() | flask.Response |
20+ | test.py:60 | make_response() | flask.Response |
21+ | test.py:64 | make_response() | flask.Response |
Original file line number Diff line number Diff line change 44app = Flask (__name__ )
55
66@app .route ("/" )
7- def hello ():
7+ def hello_world ():
88 return "Hello World!"
99
1010from flask .views import MethodView
@@ -44,3 +44,24 @@ def unsafe():
4444def safe ():
4545 first_name = request .args .get ('name' , '' )
4646 return make_response ("Your name is " + escape (first_name ))
47+
48+ @app .route ('/hello/<name>' )
49+ def hello (name ):
50+ return make_response ("Your name is " + name )
51+
52+ @app .route ('/foo/<path:subpath>' )
53+ def foo (subpath ):
54+ return make_response ("The subpath is " + subpath )
55+
56+ @app .route ('/multiple/' ) # TODO: not recognized as route
57+ @app .route ('/multiple/foo/<foo>' ) # TODO: not recognized as route
58+ @app .route ('/multiple/bar/<bar>' )
59+ def multiple (foo = None , bar = None ):
60+ return make_response ("foo={!r} bar={!r}" .format (foo , bar ))
61+
62+ @app .route ('/complex/<string(length=2):lang_code>' )
63+ def complex (lang_code ):
64+ return make_response ("lang_code {}" .format (lang_code ))
65+
66+ if __name__ == "__main__" :
67+ app .run (debug = True )
You can’t perform that action at this time.
0 commit comments