"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/service_inspectors/http_inspect/http_msg_body.cc" between
snort3-3.1.29.0.tar.gz and snort3-3.1.30.0.tar.gz

About: Snort 3 is a network intrusion prevention and detection system (IDS/IPS) combining the benefits of signature, protocol and anomaly-based inspection.

http_msg_body.cc  (snort3-3.1.29.0):http_msg_body.cc  (snort3-3.1.30.0)
skipping to change at line 399 skipping to change at line 399
void HttpMsgBody::do_enhanced_js_normalization(const Field& input, Field& output ) void HttpMsgBody::do_enhanced_js_normalization(const Field& input, Field& output )
{ {
if (session_data->js_data_lost_once) if (session_data->js_data_lost_once)
return; return;
auto infractions = transaction->get_infractions(source_id); auto infractions = transaction->get_infractions(source_id);
auto back = !session_data->partial_flush[source_id]; auto back = !session_data->partial_flush[source_id];
auto http_header = get_header(source_id); auto http_header = get_header(source_id);
auto normalizer = params->js_norm_param.js_norm; auto normalizer = params->js_norm_param.js_norm;
if ((*infractions & INF_UNKNOWN_ENCODING) or (*infractions & INF_UNSUPPORTED
_ENCODING))
return;
if (session_data->is_pdu_missed()) if (session_data->is_pdu_missed())
{ {
*infractions += INF_JS_PDU_MISS; *infractions += INF_JS_PDU_MISS;
session_data->events[HttpCommon::SRC_SERVER]->create_event(EVENT_JS_PDU_ MISS); session_data->events[HttpCommon::SRC_SERVER]->create_event(EVENT_JS_PDU_ MISS);
session_data->js_data_lost_once = true; session_data->js_data_lost_once = true;
return; return;
} }
if (http_header and http_header->is_external_js()) if (http_header and http_header->is_external_js())
normalizer->do_external(input, output, infractions, session_data, back); normalizer->do_external(input, output, infractions, session_data, back);
skipping to change at line 585 skipping to change at line 588
decompressed_vba_data.set(STAT_NOT_PRESENT); decompressed_vba_data.set(STAT_NOT_PRESENT);
return decompressed_vba_data; return decompressed_vba_data;
} }
const Field& HttpMsgBody::get_norm_js_data() const Field& HttpMsgBody::get_norm_js_data()
{ {
if (norm_js_data.length() != STAT_NOT_COMPUTE) if (norm_js_data.length() != STAT_NOT_COMPUTE)
return norm_js_data; return norm_js_data;
if (decompressed_file_body.length() <= 0)
{
norm_js_data.set(STAT_NO_SOURCE);
return norm_js_data;
}
do_enhanced_js_normalization(decompressed_file_body, norm_js_data); do_enhanced_js_normalization(decompressed_file_body, norm_js_data);
if (norm_js_data.length() == STAT_NOT_COMPUTE) if (norm_js_data.length() == STAT_NOT_COMPUTE)
norm_js_data.set(STAT_NOT_PRESENT); norm_js_data.set(STAT_NOT_PRESENT);
return norm_js_data; return norm_js_data;
} }
int32_t HttpMsgBody::get_publish_length() const int32_t HttpMsgBody::get_publish_length() const
{ {
 End of changes. 2 change blocks. 
0 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)