Skip to content

Commit c25bc91

Browse files
MegaManSecdvershinin
authored andcommitted
proxy_pass_normalized: do not report on modifier equal to '='
1 parent 90d9e6b commit c25bc91

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

gixy/plugins/proxy_pass_normalized.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,15 @@ def __init__(self, config):
2626

2727
def audit(self, directive):
2828
proxy_pass_args = directive.args
29-
3029
rewrite_fail = False
30+
parent = directive.parent
3131

3232
if not proxy_pass_args:
3333
return
3434

35+
if not parent or parent.name != 'location' or parent.modifier == '=':
36+
return
37+
3538
if proxy_pass_args[0].startswith("$") and '/' not in proxy_pass_args[0]:
3639
# If proxy pass destination is defined by only a variable, it is not possible to check for path normalization issues
3740
return

0 commit comments

Comments
 (0)