Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions nettacker/core/lib/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import aiohttp
import uvloop
from yarl import URL

from nettacker.core.lib.base import BaseEngine
from nettacker.core.utils.common import (
Expand All @@ -34,6 +35,8 @@ async def perform_request_action(action, request_options):


async def send_request(request_options, method):
if request_options.pop("url_raw", False):
request_options["url"] = URL(request_options["url"], encoded=True)
async with aiohttp.ClientSession() as session:
Comment on lines +38 to 40
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url_raw is popped from request_options before the URL(..., encoded=True) conversion runs. If the conversion raises (e.g., due to invalid percent-escapes or other characters that are only accepted in the non-encoded constructor), the caller’s retry loop will run again with url_raw already removed and will silently fall back to the default URL normalization path, defeating the opt-in behavior. Consider reading the flag with get() and only pop()-ing it after a successful conversion (or build a shallow copy of request_options for the aiohttp call and leave the original dict untouched).

Copilot uses AI. Check for mistakes.
action = getattr(session, method, None)
response = await asyncio.gather(
Expand Down
1 change: 1 addition & 0 deletions nettacker/modules/vuln/apache_cve_2021_41773.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ payloads:
headers:
User-Agent: "{user_agent}"
ssl: false
url_raw: true
url:
nettacker_fuzzer:
input_format: "{{schema}}://{target}:{{ports}}/{{path}}"
Expand Down
Loading