[Nepenthes-devel] [PATCH v2 1/3] curl - do not create session when there is no _url in the incident
Status: Beta
Brought to you by:
nepenthesdev
From: <kat...@ni...> - 2014-01-10 11:32:32
|
--- modules/curl/module.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/curl/module.c b/modules/curl/module.c index 5c7b076..5a66c24 100644 --- a/modules/curl/module.c +++ b/modules/curl/module.c @@ -424,15 +424,17 @@ void session_upload_new(struct incident *i) GString *gstemp; char *url; - struct session *session = session_new(); + struct session *session = NULL; - session->type = session_type_upload; - if (incident_value_string_get(i, "_url", &gstemp) == false ) { g_debug("dionaea.upload.request got no _url in incident!"); return; } + + session = session_new(); + session->type = session_type_upload; + url = gstemp->str; session->url = g_strdup(url); -- 1.7.9.5 |