MCPcopy Index your code
hub / github.com/OWASP/Python-Honeypot / get_value_from_request

Function get_value_from_request

api/server.py:85–105  ·  view source on GitHub ↗

Get a value from GET, POST or COOKIES Args: _key: the value name to find Returns: the value content if found otherwise None

(_key)

Source from the content-addressed store, hash-verified

83
84
85def get_value_from_request(_key):
86 """
87 Get a value from GET, POST or COOKIES
88
89 Args:
90 _key: the value name to find
91
92 Returns:
93 the value content if found otherwise None
94 """
95 try:
96 value = flask_request.args[_key]
97 except Exception:
98 try:
99 value = flask_request.form[_key]
100 except Exception:
101 try:
102 value = flask_request.cookies[_key]
103 except Exception:
104 value = None
105 return value
106
107
108def is_authorized():

Callers 5

is_authorizedFunction · 0.85
count_eventsFunction · 0.85
groupby_elementFunction · 0.85
get_events_dataFunction · 0.85
download_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected