Skip to content

Commit

Permalink
webapp: fix http replay requests
Browse files Browse the repository at this point in the history
  • Loading branch information
aiooss-anssi committed Jul 12, 2024
1 parent 3d7bc44 commit 9d02b1a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions webapp/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ async def api_replay_http(request):

# For each HTTP request, load client payload if it exists
data = []
for row in rows:
for tx_id, row in enumerate(rows):
req = row_to_dict(row)
req["rq_content"] = None
if req["http_method"] in ["POST"]:
# Get associated fileinfo
# First result should be the request
cursor = await eve_database.execute(
"SELECT extra_data FROM fileinfo WHERE flow_id = ? ORDER BY id",
[flow_id],
"SELECT extra_data FROM fileinfo WHERE flow_id = ? AND extra_data->>'tx_id' = ? ORDER BY id",
[flow_id, tx_id],
)
fileinfo_first_event = await cursor.fetchone()
if not fileinfo_first_event:
Expand Down

0 comments on commit 9d02b1a

Please sign in to comment.