diff --git a/CHANGES b/CHANGES index 8240a03ed1..61d358a11b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,9 @@ +2.2-102 | 2014-01-20 12:00:29 -0800 + + * Include file information (MIME type and description) into notice + emails if available. (Justin Azoff) + 2.2-100 | 2014-01-20 11:54:58 -0800 * Fix caching of recently validated SSL certifcates. (Justin Azoff) diff --git a/VERSION b/VERSION index 25f3aaedd5..216e72e184 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.2-100 +2.2-102 diff --git a/scripts/base/frameworks/notice/main.bro b/scripts/base/frameworks/notice/main.bro index dac87662c4..bbd4643b3d 100644 --- a/scripts/base/frameworks/notice/main.bro +++ b/scripts/base/frameworks/notice/main.bro @@ -389,11 +389,22 @@ function email_notice_to(n: Notice::Info, dest: string, extend: bool) # First off, finish the headers and include the human readable messages # then leave a blank line after the message. - email_text = string_cat(email_text, "\nMessage: ", n$msg); - if ( n?$sub ) - email_text = string_cat(email_text, "\nSub-message: ", n$sub); + email_text = string_cat(email_text, "\nMessage: ", n$msg, "\n"); - email_text = string_cat(email_text, "\n\n"); + if ( n?$sub ) + email_text = string_cat(email_text, "Sub-message: ", n$sub, "\n"); + + email_text = string_cat(email_text, "\n"); + + # Add information about the file if it exists. + if ( n?$file_desc ) + email_text = string_cat(email_text, "File Description: ", n$file_desc, "\n"); + + if ( n?$file_mime_type ) + email_text = string_cat(email_text, "File MIME Type: ", n$file_mime_type, "\n"); + + if ( n?$file_desc || n?$file_mime_type ) + email_text = string_cat(email_text, "\n"); # Next, add information about the connection if it exists. if ( n?$id )