From f956554c74c75bc9f6514f172d73c5ad9697cecd Mon Sep 17 00:00:00 2001 From: Seth Hall Date: Mon, 3 Dec 2012 11:57:00 -0500 Subject: [PATCH] Slightly fix up file name extraction from Content-Disposition headers. --- scripts/base/utils/files.bro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/base/utils/files.bro b/scripts/base/utils/files.bro index ccd03df0e6..e1e599b0b6 100644 --- a/scripts/base/utils/files.bro +++ b/scripts/base/utils/files.bro @@ -19,7 +19,7 @@ function generate_extraction_filename(prefix: string, c: connection, suffix: str ## the filename. function extract_filename_from_content_disposition(data: string): string { - local filename = sub(data, /^.*[fF][iI][lL][eE][nN][aA][mM][eE]=/, ""); + local filename = sub(data, /^.*[fF][iI][lL][eE][nN][aA][mM][eE][[:blank:]]*=[[:blank:]]*/, ""); # Remove quotes around the filename if they are there. if ( /^\"/ in filename ) filename = split_n(filename, /\"/, F, 2)[2];