From 94bbf0336bbf60a58345377df2a4ce3683db6955 Mon Sep 17 00:00:00 2001 From: elsapet Date: Fri, 10 May 2024 16:59:13 +0200 Subject: [PATCH] fix: django request methods --- rules/python/shared/django/user_input.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/rules/python/shared/django/user_input.yml b/rules/python/shared/django/user_input.yml index 067e19a1..2a74ba53 100644 --- a/rules/python/shared/django/user_input.yml +++ b/rules/python/shared/django/user_input.yml @@ -2,9 +2,14 @@ type: shared languages: - python patterns: - - request.$<_> - - request.$<_>() - - request.$<_>.$<_>() + - pattern: request.$.get() + filters: + - variable: METHOD + regex: i\A(post|files|get|data|query_params|content_type|stream)\z + - pattern: request.$[$<_>] + filters: + - variable: METHOD + regex: i\A(post|files|get|data|query_params|content_type|stream)\z - pattern: $
.$[$<_>] filters: - variable: FORM