File tree Expand file tree Collapse file tree 3 files changed +28
-28
lines changed
python/ql/lib/semmle/python Expand file tree Collapse file tree 3 files changed +28
-28
lines changed Original file line number Diff line number Diff line change @@ -1425,7 +1425,7 @@ module Http {
14251425 string middleware_name ( ) { result = super .middleware_name ( ) }
14261426
14271427 /**
1428- * Gets the dataflow node corresponding to the allowed CORS origins
1428+ * Gets the dataflow node corresponding to the allowed CORS origins
14291429 */
14301430 DataFlow:: Node allowed_origins ( ) { result = super .allowed_origins ( ) }
14311431
Original file line number Diff line number Diff line change @@ -43,30 +43,32 @@ module FastApi {
4343 * A call to `app.add_middleware` adding CORSMiddleware.
4444 */
4545 class AddCorsMiddlewareCall extends Http:: Server:: CorsMiddleware:: Range , AddMiddlewareCall {
46- /**
47- * Gets the string corresponding to the middleware
48- */
46+ /**
47+ * Gets the string corresponding to the middleware
48+ */
4949 override string middleware_name ( ) { result = this .getArg ( 0 ) .asExpr ( ) .( Name ) .toString ( ) }
5050
5151 /**
52- * Gets the dataflow node corresponding to the allowed CORS origins
53- */
52+ * Gets the dataflow node corresponding to the allowed CORS origins
53+ */
5454 override DataFlow:: Node allowed_origins ( ) { result = this .getArgByName ( "allow_origins" ) }
55- /**
56- * Gets the boolean value corresponding to if CORS credentials is enabled
57- * (`true`) or disabled (`false`) by this node.
58- */
55+
56+ /**
57+ * Gets the boolean value corresponding to if CORS credentials is enabled
58+ * (`true`) or disabled (`false`) by this node.
59+ */
5960 override DataFlow:: Node allowed_credentials ( ) {
6061 result = this .getArgByName ( "allow_credentials" )
6162 }
62- /**
63- * Gets the dataflow node corresponding to the allowed CORS methods
64- */
63+
64+ /**
65+ * Gets the dataflow node corresponding to the allowed CORS methods
66+ */
6567 DataFlow:: Node allowed_methods ( ) { result = this .getArgByName ( "allow_methods" ) }
6668
67- /**
68- * Gets the dataflow node corresponding to the allowed CORS headers
69- */
69+ /**
70+ * Gets the dataflow node corresponding to the allowed CORS headers
71+ */
7072 DataFlow:: Node allowed_headers ( ) { result = this .getArgByName ( "allow_headers" ) }
7173 }
7274
Original file line number Diff line number Diff line change @@ -27,8 +27,6 @@ private import semmle.python.frameworks.data.ModelsAsData
2727module Starlette {
2828 /**
2929 * Provides models for the `starlette.app` class
30- *
31- *
3230 */
3331 module App {
3432 /** Gets import of `starlette.app`. */
@@ -53,25 +51,25 @@ module Starlette {
5351 * A call to any of the execute methods on a `app.add_middleware` with CORSMiddleware.
5452 */
5553 class AddCorsMiddlewareCall extends AddMiddlewareCall , Http:: Server:: CorsMiddleware:: Range {
56-
57- /**
58- * Gets the string corresponding to the middleware
59- */
54+ /**
55+ * Gets the string corresponding to the middleware
56+ */
6057 override string middleware_name ( ) { result = this .getArg ( 0 ) .asExpr ( ) .( Name ) .toString ( ) }
6158
6259 override DataFlow:: Node allowed_origins ( ) { result = this .getArgByName ( "allow_origins" ) }
6360
6461 override DataFlow:: Node allowed_credentials ( ) {
6562 result = this .getArgByName ( "allow_credentials" )
6663 }
67- /**
68- * Gets the dataflow node corresponding to the allowed CORS methods
69- */
64+
65+ /**
66+ * Gets the dataflow node corresponding to the allowed CORS methods
67+ */
7068 DataFlow:: Node allowed_methods ( ) { result = this .getArgByName ( "allow_methods" ) }
7169
72- /**
73- * Gets the dataflow node corresponding to the allowed CORS headers
74- */
70+ /**
71+ * Gets the dataflow node corresponding to the allowed CORS headers
72+ */
7573 DataFlow:: Node allowed_headers ( ) { result = this .getArgByName ( "allow_headers" ) }
7674 }
7775
You can’t perform that action at this time.
0 commit comments