diff --git a/conf/default/web.conf.default b/conf/default/web.conf.default index 0966b8f943f..6ec3a00c89d 100644 --- a/conf/default/web.conf.default +++ b/conf/default/web.conf.default @@ -66,8 +66,8 @@ expose_process_log = no reprocess_tasks = no # Allow to reprocess failed processing tasks reprocess_failed_processing = no -# Allows you to define URL splitter, "," is default -url_splitter = , +# Allows you to define URL splitter (for example comma). Empty value disables splitting +url_splitter = # Limit number of files extracted from archive in demux.py demux_files_limit = 10 diff --git a/web/submission/views.py b/web/submission/views.py index 5e0f26d1cff..fd3282fa413 100644 --- a/web/submission/views.py +++ b/web/submission/views.py @@ -426,7 +426,8 @@ def index(request, task_id=None, resubmit_hash=None): if task_category in ("url", "dlnexec"): if not samples: return render(request, "error.html", {"error": "You specified an invalid URL!"}) - for url in samples.split(web_conf.general.url_splitter): + urls = [u.strip() for u in samples.split(web_conf.general.url_splitter) if u.strip()] if web_conf.general.url_splitter else [samples] + for url in urls: url = url.replace("hxxps://", "https://").replace("hxxp://", "http://").replace("[.]", ".") if task_category == "dlnexec": path, content, sha256 = process_new_dlnexec_task(url, route, options, custom)