cms_scanner 0.13.7 → 0.13.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/core.rb +17 -3
- data/lib/cms_scanner/version.rb +1 -1
- data/lib/cms_scanner/web_site.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c30dcbc053e4087d1f308d8390d026a028ddb2ca7c8f5f01108e72beed649e76
|
4
|
+
data.tar.gz: fdd30f85d4a8847da231678c1a785002421f322d65623a9ad66168a007cba420
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a63a0447cc9f8dcc69974e6b82e93db96d534006e5a5a35b5de56a2374d8a28750034b3490e6180e8d1706a01132eb90ca49e6dc8060c4c625b704a93a76e862
|
7
|
+
data.tar.gz: 9b5e1f8fa8cbee20c75b163814196cc08292fbff28a6feb6d5f52f58cf36ecd9bbbd161b8c38abf3476fb7a87e564fcdb5bbb554c0611d4ba0a146dc083cb3e2
|
data/app/controllers/core.rb
CHANGED
@@ -48,14 +48,28 @@ module CMSScanner
|
|
48
48
|
raise Error::ProxyAuthRequired
|
49
49
|
end
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
handle_redirection(res)
|
52
|
+
end
|
53
|
+
|
54
|
+
# Checks for redirects, an out of scope redirect will raise an Error::HTTPRedirect
|
55
|
+
#
|
56
|
+
# @param [ Typhoeus::Response ] res
|
57
|
+
def handle_redirection(res)
|
58
|
+
effective_url = target.homepage_res.effective_url # Basically get and follow location of target.url
|
59
|
+
effective_uri = Addressable::URI.parse(effective_url)
|
60
|
+
|
61
|
+
# Case of http://a.com => https://a.com (or the opposite)
|
62
|
+
if !NS::ParsedCli.ignore_main_redirect && target.uri.domain == effective_uri.domain &&
|
63
|
+
target.uri.path == effective_uri.path && target.uri.scheme != effective_uri.scheme
|
64
|
+
|
65
|
+
target.url = effective_url
|
66
|
+
end
|
54
67
|
|
55
68
|
return if target.in_scope?(effective_url)
|
56
69
|
|
57
70
|
raise Error::HTTPRedirect, effective_url unless NS::ParsedCli.ignore_main_redirect
|
58
71
|
|
72
|
+
# Sets back homepage_res to unfollowed location in case of ignore_main_redirect used
|
59
73
|
target.homepage_res = res
|
60
74
|
end
|
61
75
|
|
data/lib/cms_scanner/version.rb
CHANGED
data/lib/cms_scanner/web_site.rb
CHANGED
@@ -115,7 +115,7 @@ module CMSScanner
|
|
115
115
|
|
116
116
|
# @return [ Hash ] The Typhoeus params to use to perform head requests
|
117
117
|
def head_or_get_params
|
118
|
-
@head_or_get_params ||= if NS::Browser.head(homepage_url).code
|
118
|
+
@head_or_get_params ||= if [0, 405, 501].include?(NS::Browser.head(homepage_url).code)
|
119
119
|
{ method: :get, maxfilesize: 1 }
|
120
120
|
else
|
121
121
|
{ method: :head }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cms_scanner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- WPScanTeam
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ethon
|
@@ -236,14 +236,14 @@ dependencies:
|
|
236
236
|
requirements:
|
237
237
|
- - "~>"
|
238
238
|
- !ruby/object:Gem::Version
|
239
|
-
version: 1.
|
239
|
+
version: 1.26.0
|
240
240
|
type: :development
|
241
241
|
prerelease: false
|
242
242
|
version_requirements: !ruby/object:Gem::Requirement
|
243
243
|
requirements:
|
244
244
|
- - "~>"
|
245
245
|
- !ruby/object:Gem::Version
|
246
|
-
version: 1.
|
246
|
+
version: 1.26.0
|
247
247
|
- !ruby/object:Gem::Dependency
|
248
248
|
name: rubocop-performance
|
249
249
|
requirement: !ruby/object:Gem::Requirement
|