diff --git a/CHANGES b/CHANGES
index a1ebce480d..7ab621b970 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,8 @@
+2.2-388 | 2014-04-24 18:38:07 -0700
+
+ * Fix decoding of MIME quoted-printable. (Mareq)
+
2.2-386 | 2014-04-24 18:22:29 -0700
* Do a Intel::ADDR lookup for host field if we find an IP address
diff --git a/VERSION b/VERSION
index 9e2029bbe6..d3f1ba4bf8 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.2-386
+2.2-388
diff --git a/scripts/policy/frameworks/intel/seen/http-headers.bro b/scripts/policy/frameworks/intel/seen/http-headers.bro
index 3746ec9def..a961896640 100644
--- a/scripts/policy/frameworks/intel/seen/http-headers.bro
+++ b/scripts/policy/frameworks/intel/seen/http-headers.bro
@@ -8,18 +8,18 @@ event http_header(c: connection, is_orig: bool, name: string, value: string)
{
switch ( name )
{
- case "HOST":
- if ( is_valid_ip(value) )
- Intel::seen([$host=to_addr(value),
- $indicator_type=Intel::ADDR,
- $conn=c,
- $where=HTTP::IN_HOST_HEADER]);
- else
- Intel::seen([$indicator=value,
- $indicator_type=Intel::DOMAIN,
- $conn=c,
- $where=HTTP::IN_HOST_HEADER]);
- break;
+ case "HOST":
+ if ( is_valid_ip(value) )
+ Intel::seen([$host=to_addr(value),
+ $indicator_type=Intel::ADDR,
+ $conn=c,
+ $where=HTTP::IN_HOST_HEADER]);
+ else
+ Intel::seen([$indicator=value,
+ $indicator_type=Intel::DOMAIN,
+ $conn=c,
+ $where=HTTP::IN_HOST_HEADER]);
+ break;
case "REFERER":
Intel::seen([$indicator=sub(value, /^.*:\/\//, ""),
diff --git a/src/analyzer/protocol/mime/MIME.cc b/src/analyzer/protocol/mime/MIME.cc
index f4e7d3981f..6f992c9256 100644
--- a/src/analyzer/protocol/mime/MIME.cc
+++ b/src/analyzer/protocol/mime/MIME.cc
@@ -1044,6 +1044,7 @@ void MIME_Entity::DecodeQuotedPrintable(int len, const char* data)
{
DataOctet((a << 4) + b);
legal = 1;
+ i += 2;
}
}
diff --git a/testing/btest/Baseline/scripts.base.frameworks.file-analysis.smtp/out b/testing/btest/Baseline/scripts.base.frameworks.file-analysis.smtp/out
index 57f1f97b9c..1d54e9a2ac 100644
--- a/testing/btest/Baseline/scripts.base.frameworks.file-analysis.smtp/out
+++ b/testing/btest/Baseline/scripts.base.frameworks.file-analysis.smtp/out
@@ -20,12 +20,12 @@ MIME_TYPE
text/html
FILE_OVER_NEW_CONNECTION
FILE_STATE_REMOVE
-file #1, 1918, 0
+file #1, 1868, 0
[orig_h=10.10.1.4, orig_p=1470/tcp, resp_h=74.53.140.153, resp_p=25/tcp]
source: SMTP
-MD5: d194c6359c85bb88b54caee18b1e9b44
-SHA1: e54af6c6616525611364b80bd6557a7ea21dae94
-SHA256: b9556e92ddbe52379b64804136f830d111cafe7fcd78e54817fe40f3bc24268d
+MD5: afd68ae5c63caf6050dc5440bd72c5dd
+SHA1: a4825db9a78b6c631f3c97d363be47faf65e8386
+SHA256: 8d9e5bb6072fbbf5b4a5fabe89ede8c8c54915efe33704fe71420d50438f5f81
FILE_NEW
file #2, 0, 0
FILE_BOF_BUFFER
@@ -34,9 +34,9 @@ MIME_TYPE
text/plain
FILE_OVER_NEW_CONNECTION
FILE_STATE_REMOVE
-file #2, 10823, 0
+file #2, 10809, 0
[orig_h=10.10.1.4, orig_p=1470/tcp, resp_h=74.53.140.153, resp_p=25/tcp]
source: SMTP
-MD5: a968bb0f9f9d95835b2e74c845877e87
-SHA1: 43bf1cea1cd4b7d15243e15611859aa49d515665
-SHA256: d5c4e7248840932b9d74ea2f3b3ae142c723a863abf5fd0599f9dd1171697e12
+MD5: 30a60389acc290515651391154ba1b33
+SHA1: 5d3e96afdef531571b685aa2a3729e6fe635e413
+SHA256: 6ea20e4b4f218a715ddfd0c27a92def1020a47a1c2cc6971a6710746efabf868
diff --git a/testing/btest/Baseline/scripts.base.frameworks.file-analysis.smtp/thefile1 b/testing/btest/Baseline/scripts.base.frameworks.file-analysis.smtp/thefile1
index 0b9186c58e..befde863a6 100644
--- a/testing/btest/Baseline/scripts.base.frameworks.file-analysis.smtp/thefile1
+++ b/testing/btest/Baseline/scripts.base.frameworks.file-analysis.smtp/thefile1
@@ -1,8 +1,8 @@
-
+
-
-
+
+
-
+
-
+
-
Hello
+
Hello
-
+
-
I send u smtp pcap file
+
I send u smtp pcap file
-
Find the attachment
+
Find the attachment
-
+
-
GPS
+
GPS
diff --git a/testing/btest/Baseline/scripts.base.frameworks.file-analysis.smtp/thefile2 b/testing/btest/Baseline/scripts.base.frameworks.file-analysis.smtp/thefile2
index 9eb3055735..6af5f49a43 100644
--- a/testing/btest/Baseline/scripts.base.frameworks.file-analysis.smtp/thefile2
+++ b/testing/btest/Baseline/scripts.base.frameworks.file-analysis.smtp/thefile2
@@ -20,9 +20,9 @@ Version 4.9.8.7
* Added support for GCC > 3.2
* Debug variables are now resent during next debug session
* Watched Variables not in correct context are now kept and updated when it is needed
-* Added new compiler/linker options: 20
+* Added new compiler/linker options:
- Strip executable
- - Generate instructions for a specific machine (i386, i486, i586, i686, pentium, pentium-mmx, pentiumpro, pentium2, pentium3, pentium4, 20
+ - Generate instructions for a specific machine (i386, i486, i586, i686, pentium, pentium-mmx, pentiumpro, pentium2, pentium3, pentium4,
k6, k6-2, k6-3, athlon, athlon-tbird, athlon-4, athlon-xp, athlon-mp, winchip-c6, winchip2, k8, c3 and c3-2)
- Enable use of processor specific built-in functions (mmmx, sse, sse2, pni, 3dnow)
* "Default" button in Compiler Options is back
@@ -42,16 +42,16 @@ Version 4.9.8.4
* Bug fixes
Version 4.9.8.3
-* On Dev-C++ first time configuration dialog, a code completion cache of all the standard 20
+* On Dev-C++ first time configuration dialog, a code completion cache of all the standard
include files can now be generated.
* Improved WebUpdate module
* Many bug fixes
Version 4.9.8.2
* New debug feature for DLLs: attach to a running process
-* New project option: Use custom Makefile. 20
+* New project option: Use custom Makefile.
* New WebUpdater module.
-* Allow user to specify an alternate configuration file in Environment Options 20
+* Allow user to specify an alternate configuration file in Environment Options
(still can be overriden by using "-c" command line parameter).
* Lots of bug fixes.
@@ -150,7 +150,7 @@ Version 4.9.6.9
* Implemented "compiler sets" infrastructure to switch between different compilers easily (e.g. gcc-2.95 and gcc-3.2)
* Added "Files" tab in CVS form to allow selection of more than one file for
the requested CVS action
- 20
+
Version 4.9.6.8
* support for DLL application hosting, for debugging and executing DLLs under Dev-C++.
* New class browser option: "Show inherited members"
@@ -248,7 +248,7 @@ Version 4.9.5.0 (5.0 beta 5):
* Folders in Project and Class Browser
* Send custom commands to GDB
* Makefile can now be customized.
-* Modified the behaviour of the -c param : 20
+* Modified the behaviour of the -c param :
-c
* Saving of custom syntax parameter group
* Possibility of changing compilers and tools filename.
diff --git a/testing/btest/Baseline/scripts.policy.misc.dump-events/all-events.log b/testing/btest/Baseline/scripts.policy.misc.dump-events/all-events.log
index 9f61bfbd3b..85d4e120ab 100644
--- a/testing/btest/Baseline/scripts.policy.misc.dump-events/all-events.log
+++ b/testing/btest/Baseline/scripts.policy.misc.dump-events/all-events.log
@@ -337,10 +337,10 @@
[2] is_orig: bool = F
1254722770.692786 file_new
- [0] f: fa_file = [id=Ft4M3f2yMvLlmwtbq9, parent_id=, source=SMTP, is_orig=F, conns={^J^I[[orig_h=10.10.1.4, orig_p=1470/tcp, resp_h=74.53.140.153, resp_p=25/tcp]] = [id=[orig_h=10.10.1.4, orig_p=1470/tcp, resp_h=74.53.140.153, resp_p=25/tcp], orig=[size=3070, state=4, num_pkts=10, num_bytes_ip=2018, flow_label=0], resp=[size=462, state=4, num_pkts=10, num_bytes_ip=870, flow_label=0], start_time=1254722767.529046, duration=3.16374, service={^J^I^ISMTP^J^I}, addl=, hot=0, history=ShAdDa, uid=CjhGID4nQcgTWjvg4c, tunnel=, dpd=, conn=, extract_orig=F, extract_resp=F, dhcp=, dnp3=, dns=, dns_state=, ftp=, ftp_data_reuse=F, ssl=, http=, http_state=, irc=, modbus=, smtp=[ts=1254722768.219663, uid=CjhGID4nQcgTWjvg4c, id=[orig_h=10.10.1.4, orig_p=1470/tcp, resp_h=74.53.140.153, resp_p=25/tcp], trans_depth=1, helo=GP, mailfrom=, rcptto={^J^I^I^J^I}, date=Mon, 5 Oct 2009 11:36:07 +0530, from="Gurpartap Singh" , to={^J^I^I^J^I}, reply_to=, msg_id=<000301ca4581$ef9e57f0$cedb07d0$@in>, in_reply_to=, subject=SMTP, x_originating_ip=, first_received=, second_received=, last_reply=354 Enter message, ending with "." on a line by itself, path=[74.53.140.153, 10.10.1.4], user_agent=Microsoft Office Outlook 12.0, process_received_from=T, has_client_activity=T, entity=[filename=], fuids=[Fel9gs4OtNEV6gUJZ5]], smtp_state=[helo=GP, messages_transferred=0, pending_messages=, mime_depth=4], socks=, ssh=, syslog=]^J}, last_active=1254722770.692786, seen_bytes=0, total_bytes=, missing_bytes=0, overflow_bytes=0, timeout_interval=2.0 mins, bof_buffer_size=1024, bof_buffer=^M^J^M^J^M^J^M^J^M^J