From cbf89c8ed842a58c282872cf8c42adf9b8b2ffee Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Tue, 20 Sep 2016 14:11:29 -0700 Subject: Check preference titles and descriptions. When registering preferences, make sure our titles and descriptions are valid UTF-8. Make sure our titles are short and only contain printable characters. Fix problematic titles and descriptions. Change-Id: I20d3f93438f2b3c30266f934297feb79897f2ee5 Reviewed-on: https://code.wireshark.org/review/18998 Reviewed-by: Gerald Combs Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/asn1/snmp/packet-snmp-template.c | 2 +- epan/dissectors/packet-cp2179.c | 2 +- epan/dissectors/packet-diameter.c | 2 +- epan/dissectors/packet-distcc.c | 2 +- epan/dissectors/packet-eth.c | 4 ++-- epan/dissectors/packet-ieee80211.c | 19 ++++++++----------- epan/dissectors/packet-ipv6.c | 4 ++-- epan/dissectors/packet-iscsi.c | 2 +- epan/dissectors/packet-rpc.c | 2 +- epan/dissectors/packet-rtsp.c | 3 +-- epan/dissectors/packet-smtp.c | 2 +- epan/dissectors/packet-snmp.c | 2 +- 12 files changed, 21 insertions(+), 25 deletions(-) (limited to 'epan/dissectors') diff --git a/epan/dissectors/asn1/snmp/packet-snmp-template.c b/epan/dissectors/asn1/snmp/packet-snmp-template.c index 90d0a3aebe..7e4ade2470 100644 --- a/epan/dissectors/asn1/snmp/packet-snmp-template.c +++ b/epan/dissectors/asn1/snmp/packet-snmp-template.c @@ -2540,7 +2540,7 @@ void proto_register_snmp(void) { prefs_register_obsolete_preference(snmp_module, "users_file"); prefs_register_bool_preference(snmp_module, "desegment", - "Reassemble SNMP-over-TCP messages\nspanning multiple TCP segments", + "Reassemble SNMP-over-TCP messages spanning multiple TCP segments", "Whether the SNMP dissector should reassemble messages spanning multiple TCP segments." " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", &snmp_desegment); diff --git a/epan/dissectors/packet-cp2179.c b/epan/dissectors/packet-cp2179.c index f43e5a6075..d3d5ae8197 100644 --- a/epan/dissectors/packet-cp2179.c +++ b/epan/dissectors/packet-cp2179.c @@ -1363,7 +1363,7 @@ proto_register_cp2179(void) /* Telnet protocol IAC (0xFF) processing; defaults to TRUE to allow Telnet Encapsulated Data */ prefs_register_bool_preference(cp2179_module, "telnetclean", - "Enable Automatic pre-processing of Telnet-encapsulated data to remove extra 0xFF (IAC) bytes", + "Remove extra 0xFF (IAC) bytes from Telnet-encapsulated data", "Whether the SEL Protocol dissector should automatically pre-process Telnet data to remove IAC bytes", &cp2179_telnet_clean); diff --git a/epan/dissectors/packet-diameter.c b/epan/dissectors/packet-diameter.c index 706bf05bfa..55011ac201 100644 --- a/epan/dissectors/packet-diameter.c +++ b/epan/dissectors/packet-diameter.c @@ -2345,7 +2345,7 @@ proto_register_diameter(void) /* Desegmentation */ prefs_register_bool_preference(diameter_module, "desegment", - "Reassemble Diameter messages\nspanning multiple TCP segments", + "Reassemble Diameter messages spanning multiple TCP segments", "Whether the Diameter dissector should reassemble messages spanning multiple TCP segments." " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", &gbl_diameter_desegment); diff --git a/epan/dissectors/packet-distcc.c b/epan/dissectors/packet-distcc.c index 44a1ca936b..7903ae5806 100644 --- a/epan/dissectors/packet-distcc.c +++ b/epan/dissectors/packet-distcc.c @@ -367,7 +367,7 @@ proto_register_distcc(void) distcc_module = prefs_register_protocol(proto_distcc, NULL); prefs_register_bool_preference(distcc_module, "desegment_distcc_over_tcp", - "Reassemble DISTCC-over-TCP messages\nspanning multiple TCP segments", + "Reassemble DISTCC-over-TCP messages spanning multiple TCP segments", "Whether the DISTCC dissector should reassemble messages spanning multiple TCP segments." " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", &distcc_desegment); diff --git a/epan/dissectors/packet-eth.c b/epan/dissectors/packet-eth.c index b07726fb4f..fc834c5759 100644 --- a/epan/dissectors/packet-eth.c +++ b/epan/dissectors/packet-eth.c @@ -965,11 +965,11 @@ proto_register_eth(void) ð_interpret_as_fw1_monitor); prefs_register_static_text_preference(eth_module, "ccsds_heuristic", + "Dissect as CCSDS if", "These are the conditions to match a payload against in order to determine if this\n" "is a CCSDS (Consultative Committee for Space Data Systems) packet within\n" "an 802.3 packet. A packet is considered as a possible CCSDS packet only if\n" - "one or more of the conditions are checked.", - "Describe the conditions that must be true for the CCSDS dissector to be called"); + "one or more of the conditions are checked."); prefs_register_bool_preference(eth_module, "ccsds_heuristic_length", "CCSDS Length in header matches payload size", diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index 5707251f07..f83929328b 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -27420,14 +27420,6 @@ proto_register_ieee80211(void) "Enable decryption", "Enable WEP and WPA/WPA2 decryption", &enable_decryption); - prefs_register_static_text_preference(wlan_module, "info_decryption_key", - "Key examples: 01:02:03:04:05 (40/64-bit WEP),\n" - "010203040506070809101111213 (104/128-bit WEP),\n" - "MyPassword[:MyAP] (WPA + plaintext password [+ SSID]),\n" - "0102030405...6061626364 (WPA + 256-bit key). " - "Invalid keys will be ignored.", - "Valid key formats"); - wep_uat = uat_new("WEP and WPA Decryption Keys", sizeof(uat_wep_key_record_t), /* record size */ "80211_keys", /* filename */ @@ -27435,7 +27427,7 @@ proto_register_ieee80211(void) &uat_wep_key_records, /* data_ptr */ &num_wepkeys_uat, /* numitems_ptr */ UAT_AFFECTS_DISSECTION, /* affects dissection of packets, but not set of named fields */ - NULL, /* help */ + NULL, /* help. XXX Needs chapter in WSUG */ uat_wep_key_record_copy_cb, /* copy callback */ uat_wep_key_record_update_cb, /* update callback */ uat_wep_key_record_free_cb, /* free callback */ @@ -27444,8 +27436,13 @@ proto_register_ieee80211(void) prefs_register_uat_preference(wlan_module, "wep_key_table", - "Decryption Keys", - "WEP and pre-shared WPA keys", + "Decryption keys", + "WEP and pre-shared WPA keys\n" + "Key examples: 01:02:03:04:05 (40/64-bit WEP),\n" + "010203040506070809101111213 (104/128-bit WEP),\n" + "MyPassword[:MyAP] (WPA + plaintext password [+ SSID]),\n" + "0102030405...6061626364 (WPA + 256-bit key)." + "Invalid keys will be ignored.", wep_uat); } diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c index 922c9f8bd1..c5f603bb3e 100644 --- a/epan/dissectors/packet-ipv6.c +++ b/epan/dissectors/packet-ipv6.c @@ -3501,8 +3501,8 @@ proto_register_ipv6(void) /* RPL Strict Header Checking */ prefs_register_bool_preference(ipv6_module, "perform_strict_rpl_srh_rfc_checking", - "Perform strict checking for adherence to the RFC for RPL Source Routing Headers (RFC 6554)", - "Whether to check that all RPL Source Routed packets do not visit a node more than once", + "Perform strict checking for RPL Source Routing Headers (RFC 6554)", + "Check that all RPL Source Routed packets conform to RFC 6554 and do not visit a node more than once", &g_ipv6_rpl_srh_strict_rfc_checking); prefs_register_bool_preference(ipv6_module, "try_heuristic_first", diff --git a/epan/dissectors/packet-iscsi.c b/epan/dissectors/packet-iscsi.c index fd8e00fbef..f5d44d6f53 100644 --- a/epan/dissectors/packet-iscsi.c +++ b/epan/dissectors/packet-iscsi.c @@ -3107,7 +3107,7 @@ proto_register_iscsi(void) prefs_register_bool_preference(iscsi_module, "desegment_iscsi_messages", - "Reassemble iSCSI messages\nspanning multiple TCP segments", + "Reassemble iSCSI messages spanning multiple TCP segments", "Whether the iSCSI dissector should reassemble messages spanning multiple TCP segments." " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", &iscsi_desegment); diff --git a/epan/dissectors/packet-rpc.c b/epan/dissectors/packet-rpc.c index e6bd7fa9ca..cac55c1119 100644 --- a/epan/dissectors/packet-rpc.c +++ b/epan/dissectors/packet-rpc.c @@ -4375,7 +4375,7 @@ proto_register_rpc(void) rpc_module = prefs_register_protocol(proto_rpc, NULL); prefs_register_bool_preference(rpc_module, "desegment_rpc_over_tcp", - "Reassemble RPC over TCP messages\nspanning multiple TCP segments", + "Reassemble RPC over TCP messages spanning multiple TCP segments", "Whether the RPC dissector should reassemble messages spanning multiple TCP segments." " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", &rpc_desegment); diff --git a/epan/dissectors/packet-rtsp.c b/epan/dissectors/packet-rtsp.c index 063251d193..d4f95a8453 100644 --- a/epan/dissectors/packet-rtsp.c +++ b/epan/dissectors/packet-rtsp.c @@ -1489,8 +1489,7 @@ proto_register_rtsp(void) " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", &rtsp_desegment_headers); prefs_register_bool_preference(rtsp_module, "desegment_body", - "Trust the \"Content-length:\" header and\ndesegment RTSP " - "bodies\nspanning multiple TCP segments", + "Trust the \"Content-length:\" header when desegmenting", "Whether the RTSP dissector should use the " "\"Content-length:\" value to desegment the body " "of a request spanning multiple TCP segments", diff --git a/epan/dissectors/packet-smtp.c b/epan/dissectors/packet-smtp.c index c99c582a14..8b9f367e9e 100644 --- a/epan/dissectors/packet-smtp.c +++ b/epan/dissectors/packet-smtp.c @@ -1292,7 +1292,7 @@ proto_register_smtp(void) /* Preferences */ smtp_module = prefs_register_protocol(proto_smtp, NULL); prefs_register_bool_preference(smtp_module, "desegment_lines", - "Reassemble SMTP command and response lines\nspanning multiple TCP segments", + "Reassemble SMTP command and response lines spanning multiple TCP segments", "Whether the SMTP dissector should reassemble command and response lines" " spanning multiple TCP segments. To use this option, you must also enable " "\"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", diff --git a/epan/dissectors/packet-snmp.c b/epan/dissectors/packet-snmp.c index e8774b84c8..3d51523d66 100644 --- a/epan/dissectors/packet-snmp.c +++ b/epan/dissectors/packet-snmp.c @@ -4038,7 +4038,7 @@ void proto_register_snmp(void) { prefs_register_obsolete_preference(snmp_module, "users_file"); prefs_register_bool_preference(snmp_module, "desegment", - "Reassemble SNMP-over-TCP messages\nspanning multiple TCP segments", + "Reassemble SNMP-over-TCP messages spanning multiple TCP segments", "Whether the SNMP dissector should reassemble messages spanning multiple TCP segments." " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", &snmp_desegment); -- cgit v1.2.3