mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
Python: Add note about .method
This commit is contained in:
@@ -53,6 +53,15 @@ def test_taint(request: Request, routed_param): # $ requestHandler routedParamet
|
||||
ensure_not_tainted(
|
||||
# although these could technically be user-controlled, it seems more likely to lead to FPs than interesting results.
|
||||
request.accepted_media_type,
|
||||
|
||||
# In normal Django, if you disable CSRF middleware, you're allowed to use custom
|
||||
# HTTP methods, like `curl -X FOO <url>`.
|
||||
# However, with Django REST framework, doing that will yield:
|
||||
# `{"detail":"Method \"FOO\" not allowed."}`
|
||||
#
|
||||
# In the end, since we model a Django REST framework request entirely as a
|
||||
# extension of a Django request, we're not easily able to remove the taint from
|
||||
# `.method`.
|
||||
request.method, # $ SPURIOUS: tainted
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user