Skip to content

Commit f2c2a2e

Browse files
committed
hash raw url not quoted one
1 parent eb1be1d commit f2c2a2e

File tree

1 file changed

+3
-4
lines changed
  • request-processor/src/application/core

1 file changed

+3
-4
lines changed

request-processor/src/application/core/utils.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ def append_endpoint(
141141
plugin=None,
142142
):
143143
endpoint_key = hash_sha256(endpoint_url)
144+
endpoint_url = _quote_url_if_comma(endpoint_url)
144145
exists = False
145146
new_row = None
146147

@@ -322,16 +323,14 @@ def validate_endpoint(url, config_dir, plugin, start_date=None):
322323
]
323324
)
324325

325-
safe_url = _quote_url_if_comma(url)
326-
327326
endpoint_exists = False
328327
existing_entry = None
329328

330329
try:
331330
with open(endpoint_csv_path, "r", encoding="utf-8") as f:
332331
reader = csv.DictReader(f)
333332
for row in reader:
334-
if row.get("endpoint-url", "").strip() == safe_url.strip():
333+
if row.get("endpoint-url", "").strip() == url.strip():
335334
endpoint_exists = True
336335
existing_entry = {
337336
"endpoint": row.get("endpoint", ""),
@@ -359,7 +358,7 @@ def validate_endpoint(url, config_dir, plugin, start_date=None):
359358

360359
endpoint_key, new_endpoint_row = append_endpoint(
361360
endpoint_csv_path=endpoint_csv_path,
362-
endpoint_url=safe_url,
361+
endpoint_url=url,
363362
entry_date=entry_date,
364363
start_date=start_date,
365364
end_date="",

0 commit comments

Comments
 (0)