From d9083f8b5fb7c36e033860ced90859e5cd7fddcd Mon Sep 17 00:00:00 2001 From: erwanlr Date: Sat, 24 Aug 2019 15:17:18 +0100 Subject: [PATCH] Fixes spec related to latest changes --- spec/app/models/wp_version_spec.rb | 4 ++-- spec/fixtures/db/themes.json | 24 +++++++++++-------- spec/fixtures/db/wordpresses.json | 4 +--- .../main_theme/vulnerable.cli_no_colour | 2 +- spec/output/main_theme/vulnerable.json | 6 +++-- .../wp_version/with_vulns.cli_no_colour | 1 - spec/output/wp_version/with_vulns.json | 3 --- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/spec/app/models/wp_version_spec.rb b/spec/app/models/wp_version_spec.rb index 2945b533..65bfbda5 100644 --- a/spec/app/models/wp_version_spec.rb +++ b/spec/app/models/wp_version_spec.rb @@ -59,7 +59,7 @@ describe WPScan::Model::WpVersion do it 'returns the expected result' do @expected = [WPScan::Vulnerability.new( 'WP 3.8 - Vuln 1', - { url: %w[url-4], osvdb: %w[11], wpvulndb: '3' }, + { url: %w[url-4], wpvulndb: '3' }, 'AUTHBYPASS' )] end @@ -77,7 +77,7 @@ describe WPScan::Model::WpVersion do ), WPScan::Vulnerability.new( 'WP 3.8.1 - Vuln 2', - { url: %w[url-2 url-3], osvdb: %w[10], cve: %w[2014-0166], wpvulndb: '2' }, + { url: %w[url-2 url-3], cve: %w[2014-0166], wpvulndb: '2' }, nil, '3.8.2' ) diff --git a/spec/fixtures/db/themes.json b/spec/fixtures/db/themes.json index 1765880c..4c332c0d 100644 --- a/spec/fixtures/db/themes.json +++ b/spec/fixtures/db/themes.json @@ -15,15 +15,17 @@ "updated_at" : "2015-03-05T19:37:47.000Z", "references": { "url" : [ - "http://research.evex.pw/?vuln=6", - "http://packetstormsecurity.com/files/130652/" + "http://research.evex.pw/?vuln=6" + ], + "packetstorm": [ + "130652" ] - }, - "title" : "Dignitas 1.1.9 - Privilage Escalation", - "id" : 7825, - "vuln_type" : "AUTHBYPASS" - } - ] + }, + "title" : "Dignitas 1.1.9 - Privilage Escalation", + "id" : 7825, + "vuln_type" : "AUTHBYPASS" + } + ] }, "yaaburnee-themes": { "popular": false, @@ -35,8 +37,10 @@ "updated_at" : "2015-03-05T19:41:14.000Z", "references": { "url" : [ - "http://research.evex.pw/?vuln=6", - "http://packetstormsecurity.com/files/130652/" + "http://research.evex.pw/?vuln=6" + ], + "packetstorm": [ + "130652" ] }, "title" : "Ya'aburnee 1.0.7 - Privilage Escalation", diff --git a/spec/fixtures/db/wordpresses.json b/spec/fixtures/db/wordpresses.json index e29c89f1..82eb4419 100644 --- a/spec/fixtures/db/wordpresses.json +++ b/spec/fixtures/db/wordpresses.json @@ -19,7 +19,6 @@ { "references" : { "cve" : ["2014-0166"], - "osvdb" : ["10"], "url" : ["url-2","url-3"] }, "fixed_in" : "3.8.2", @@ -36,8 +35,7 @@ "vulnerabilities" : [ { "references": { - "url" : ["url-4"], - "osvdb" : ["11"] + "url" : ["url-4"] }, "created_at" : "2014-08-01T10:58:19.000Z", "updated_at" : "2014-09-16T15:45:26.000Z", diff --git a/spec/output/main_theme/vulnerable.cli_no_colour b/spec/output/main_theme/vulnerable.cli_no_colour index 925d7a66..35858c2b 100644 --- a/spec/output/main_theme/vulnerable.cli_no_colour +++ b/spec/output/main_theme/vulnerable.cli_no_colour @@ -19,7 +19,7 @@ | References: | - https://wpvulndb.com/vulnerabilities/7825 | - http://research.evex.pw/?vuln=6 - | - http://packetstormsecurity.com/files/130652/ + | - https://packetstormsecurity.com/files/130652/ | | The version could not be determined. diff --git a/spec/output/main_theme/vulnerable.json b/spec/output/main_theme/vulnerable.json index 87b37ae4..78618df1 100644 --- a/spec/output/main_theme/vulnerable.json +++ b/spec/output/main_theme/vulnerable.json @@ -33,8 +33,10 @@ "fixed_in": null, "references": { "url": [ - "http://research.evex.pw/?vuln=6", - "http://packetstormsecurity.com/files/130652/" + "http://research.evex.pw/?vuln=6" + ], + "packetstorm": [ + "130652" ], "wpvulndb": [ "7825" diff --git a/spec/output/wp_version/with_vulns.cli_no_colour b/spec/output/wp_version/with_vulns.cli_no_colour index d9c1e8ba..bf68dd18 100644 --- a/spec/output/wp_version/with_vulns.cli_no_colour +++ b/spec/output/wp_version/with_vulns.cli_no_colour @@ -11,7 +11,6 @@ | References: | - https://wpvulndb.com/vulnerabilities/2 | - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0166 - | - http://osvdb.org/show/osvdb/10 | - url-2 | - url-3 diff --git a/spec/output/wp_version/with_vulns.json b/spec/output/wp_version/with_vulns.json index c34c751c..726c133b 100644 --- a/spec/output/wp_version/with_vulns.json +++ b/spec/output/wp_version/with_vulns.json @@ -28,9 +28,6 @@ "cve": [ "2014-0166" ], - "osvdb": [ - "10" - ], "url": [ "url-2", "url-3"