Skip to content

Commit 740ac75

Browse files
author
Wout Feys
committed
RM reset_userinput_cache_for_given_source
1 parent e9a0fc8 commit 740ac75

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

aikido_firewall/helpers/extract_strings_from_user_input.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@ def extract_strings_from_user_input_cached(obj, source):
1919
return res
2020

2121

22-
def reset_userinput_cache_for_given_source(source):
23-
"""Resets cache for the given source"""
24-
context = get_current_context()
25-
if context.parsed_userinput and context.parsed_userinput.get(source):
26-
context.parsed_userinput[source] = None # Empty cache
27-
28-
2922
def extract_strings_from_user_input(obj, path_to_payload=None):
3023
"""
3124
Extracts strings from an object (user input)

aikido_firewall/sources/xml.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
import copy
66
import importhook
77
from aikido_firewall.helpers.logging import logger
8-
from aikido_firewall.helpers.extract_strings_from_user_input import (
9-
reset_userinput_cache_for_given_source,
10-
)
118
from aikido_firewall.context import get_current_context
129

1310

@@ -24,8 +21,6 @@ def process_xml(user_input, root_element):
2421
extracted_xml_attrs[k] = set()
2522
extracted_xml_attrs[k].add(v)
2623
extracted_xml_attrs.update(set(el.items()))
27-
28-
reset_userinput_cache_for_given_source("xml")
2924
context.xml.append(extracted_xml_attrs)
3025
context.set_as_current_context()
3126

0 commit comments

Comments
 (0)