diff --git a/tests/unit/WpscanReportCommentFormatResultTest.php b/tests/unit/WpscanReportCommentFormatResultTest.php index 939874030..169b8aea9 100644 --- a/tests/unit/WpscanReportCommentFormatResultTest.php +++ b/tests/unit/WpscanReportCommentFormatResultTest.php @@ -50,7 +50,7 @@ public function testReportResultPlugin(): void { 'security' => VIPGOCI_WPSCAN_OBSOLETE, 'message' => 'My Plugin', 'details' => array( - 'plugin_uri' => 'https://wordpress.org/plugins/my-plugin', + 'uri' => 'https://wordpress.org/plugins/my-plugin', 'installed_location' => 'plugins/my-plugin', 'version_detected' => '1.0.0', 'latest_version' => '2.0.0', @@ -188,7 +188,7 @@ public function testReportResultTheme(): void { 'security' => VIPGOCI_WPSCAN_VULNERABLE, 'message' => 'My Theme', 'details' => array( - 'theme_uri' => 'https://wordpress.org/themes/my-theme', + 'uri' => 'https://wordpress.org/themes/my-theme', 'installed_location' => 'themes/my-theme', 'version_detected' => '1.0.0', 'latest_version' => '2.0.0', @@ -322,7 +322,7 @@ public function testReportResultSecurityTypeInvalid(): void { ob_start(); - $report_str = vipgoci_wpscan_report_comment_format_result( + vipgoci_wpscan_report_comment_format_result( 'repo_owner', 'repo_name', 'commit12345id', @@ -330,7 +330,7 @@ public function testReportResultSecurityTypeInvalid(): void { 'security' => 'invalid', // Invalid. 'message' => 'My Theme', 'details' => array( - 'theme_uri' => 'https://wordpress.org/themes/my-theme', + 'uri' => 'https://wordpress.org/themes/my-theme', 'installed_location' => 'themes/my-theme', 'version_detected' => '1.0.0', 'latest_version' => '2.0.0', @@ -376,7 +376,7 @@ public function testReportResultIssueTypeInvalid(): void { ob_start(); - $report_str = vipgoci_wpscan_report_comment_format_result( + vipgoci_wpscan_report_comment_format_result( 'repo_owner', 'repo_name', 'commit12345id', @@ -384,7 +384,7 @@ public function testReportResultIssueTypeInvalid(): void { 'security' => VIPGOCI_WPSCAN_OBSOLETE, 'message' => 'My Theme', 'details' => array( - 'theme_uri' => 'https://wordpress.org/themes/my-theme', + 'uri' => 'https://wordpress.org/themes/my-theme', 'installed_location' => 'themes/my-theme', 'version_detected' => '1.0.0', 'latest_version' => '2.0.0', diff --git a/wpscan-reports.php b/wpscan-reports.php index 7056c0c8c..cd3a2f88b 100644 --- a/wpscan-reports.php +++ b/wpscan-reports.php @@ -127,11 +127,11 @@ function vipgoci_wpscan_report_comment_format_result( if ( VIPGOCI_WPSCAN_PLUGIN === $issue_type ) { $res .= ' Plugin information' . "\n" . '**Plugin Name**: ' . vipgoci_output_html_escape( $issue['message'] ) . "\n" . - '**Plugin URI**: ' . vipgoci_output_html_escape( $issue['details']['plugin_uri'] ) . "\n"; + '**Plugin URI**: ' . vipgoci_output_html_escape( $issue['details']['uri'] ) . "\n"; } elseif ( VIPGOCI_WPSCAN_THEME === $issue_type ) { $res .= ' Theme information' . "\n" . '**Theme Name**: ' . vipgoci_output_html_escape( $issue['message'] ) . "\n" . - '**Theme URI**: ' . vipgoci_output_html_escape( $issue['details']['theme_uri'] ) . "\n"; + '**Theme URI**: ' . vipgoci_output_html_escape( $issue['details']['uri'] ) . "\n"; } else { vipgoci_sysexit( 'Internal error: Invalid $issue_type in ' . __FUNCTION__, @@ -179,7 +179,7 @@ function vipgoci_wpscan_report_comment_format_result( 'msg' => $issue['message'], 'level' => $issue['security'], 'version' => $issue['details']['version_detected'], - 'latest' => $issue['details']['latest_version'] + 'latest' => $issue['details']['latest_version'], ), 0, true