PluginProbe
Vigilant – 100% Free Security Suite: Firewall, 2FA, Login, Headers, Scanner… / 2.11.8
Vigilant – 100% Free Security Suite: Firewall, 2FA, Login, Headers, Scanner… v2.11.8
3.0.0 2.11.12 2.11.11 2.11.10 2.11.9 2.11.7 2.11.8 2.11.6 2.11.5 2.11.4 2.11.3 2.11.1 2.11.2 2.11.0 2.10.5 2.10.4 2.10.3 2.10.2 2.10.1 2.10.0 2.9.9 2.9.8 2.9.6 2.9.7 2.9.5 All 88 releases
← All changes | includes/class-activity-log.php +15 -3 2.10.22.11.8 View file →
@@ -930,8 +930,14 @@
930 930 * scanner probe, and a remote manager being refused apart from an intruder,
931 931 * so an owner looking at a surprising entry had no way to tell which one
932 932 * they were reading.
933 933 *
934 + * That first sentence was not true of the firewall, which is the module
935 + * that logs the most: it stored the address under 'uri', so the column
936 + * this method feeds was empty for every one of its blocks, and diagnosing
937 + * one meant reading the table by hand. Fixed in the firewall in 2.11.1;
938 + * 'uri' is read here as well so the entries already on disk show it too.
939 + *
934 940 * @since 2.10.2
935 941 *
936 942 * @param string|array|null $extra_data The entry's extra data, as stored.
937 943 * @return string The recorded address, or '' when the entry carries none.
@@ -940,20 +946,26 @@
940 946 if ( is_string( $extra_data ) ) {
941 947 $extra_data = json_decode( $extra_data, true );
942 948 }
943 949
944 - if ( ! is_array( $extra_data ) || ! isset( $extra_data['request_uri'] ) ) {
950 + if ( ! is_array( $extra_data ) ) {
945 951 return '';
946 952 }
947 953
954 + $key = isset( $extra_data['request_uri'] ) ? 'request_uri' : 'uri';
955 +
956 + if ( ! isset( $extra_data[ $key ] ) ) {
957 + return '';
958 + }
959 +
948 960 // Nothing writes anything but a string here, but the value comes back
949 961 // from a longtext column that any past version could have filled, and
950 962 // casting an array would emit a notice and print the word "Array".
951 - if ( ! is_scalar( $extra_data['request_uri'] ) ) {
963 + if ( ! is_scalar( $extra_data[ $key ] ) ) {
952 964 return '';
953 965 }
954 966
955 - return (string) $extra_data['request_uri'];
967 + return (string) $extra_data[ $key ];
956 968 }
957 969
958 970 /**
959 971 * Cleanup old logs based on retention settings (uses fresh options)