Skip to content

Commit ddd362b

Browse files
yoffRasmusWL
andauthored
Update python/ql/src/semmle/python/frameworks/Django.qll
Co-authored-by: Rasmus Wriedt Larsen <rasmuswl@github.com>
1 parent 93f91d8 commit ddd362b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

python/ql/src/semmle/python/frameworks/Django.qll

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2314,6 +2314,13 @@ private module Django {
23142314

23152315
DjangoShortcutsRedirectCall() { node.getFunction() = django::shortcuts::redirect().asCfgNode() }
23162316

2317+
/**
2318+
* Gets the data-flow node that specifies the location of this HTTP redirect response.
2319+
*
2320+
* Note: For `django.shortcuts.redirect`, the result might not be a full URL
2321+
* (as usually expected by this method), but could be a relative URL,
2322+
* a string identifying a view, or a Django model.
2323+
*/
23172324
override DataFlow::Node getRedirectLocation() {
23182325
result.asCfgNode() in [node.getArg(0), node.getArgByName("to")]
23192326
}

0 commit comments

Comments
 (0)