tcell_agent 0.2.22 → 0.2.23
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7c1c47e22a203a4c466d43a4b91f1bf23c08d73
|
4
|
+
data.tar.gz: c8fd4777d74973ed594c6db41d64a5f20909dd62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19291ca9491e12d54e0899ce3f76448bb484d78aeea332defded1132d9c1fc67c739d06d9ff3f7ef567cb767b67f7278f4aa56242cbe52c027778b99ff858ac8
|
7
|
+
data.tar.gz: ab5437c6dfdcb8d1b92327a05632f9d7b7e901e945fee90e4ea6e55a96f8217987da1ee7e1ef128eb49921c61e82434e8d2ab576148fe1cd0c7a655996890663
|
@@ -106,14 +106,12 @@ module TCellAgent
|
|
106
106
|
|
107
107
|
next unless clazz
|
108
108
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
))
|
116
|
-
end
|
109
|
+
sensors.push(clazz.new(
|
110
|
+
{
|
111
|
+
"enabled" => enabled,
|
112
|
+
"v1_compatability_enabled" => true
|
113
|
+
}
|
114
|
+
))
|
117
115
|
end
|
118
116
|
|
119
117
|
elsif version == 2
|
@@ -51,12 +51,14 @@ module TCellAgent
|
|
51
51
|
ip_info["ip"]
|
52
52
|
end
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
54
|
+
if blocked_ips.size > 0
|
55
|
+
block_rule = TCellAgent::Patches::BlockRule.from_json( {
|
56
|
+
"ips" => blocked_ips
|
57
|
+
})
|
58
|
+
|
59
|
+
if block_rule
|
60
|
+
patches_policy.block_rules.push(block_rule)
|
61
|
+
end
|
60
62
|
end
|
61
63
|
end
|
62
64
|
|
@@ -1,28 +1,28 @@
|
|
1
1
|
require 'tcell_agent/instrumentation'
|
2
2
|
|
3
3
|
module TCellAgent
|
4
|
-
class MyRailtie < Rails::Railtie
|
5
|
-
|
6
|
-
initializer "tcell.sensors" do |app|
|
7
|
-
ActiveSupport.on_load :action_controller do
|
8
4
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
appsensor_policy.csrf_rejected(tcell_data, ActionController::InvalidAuthenticityToken)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
tcell_handle_unverified_request
|
5
|
+
module CsrfExceptionReporter
|
6
|
+
def handle_unverified_request
|
7
|
+
TCellAgent::Instrumentation.safe_block("AppSensor CSRF Exception processing") do
|
8
|
+
appsensor_policy = TCellAgent.policy(TCellAgent::PolicyTypes::AppSensor)
|
9
|
+
if appsensor_policy
|
10
|
+
tcell_data = request.env[TCellAgent::Instrumentation::TCELL_ID]
|
11
|
+
if tcell_data
|
12
|
+
appsensor_policy.csrf_rejected(tcell_data, ActionController::InvalidAuthenticityToken)
|
23
13
|
end
|
24
14
|
end
|
15
|
+
end
|
25
16
|
|
17
|
+
super if defined?(super)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
class MyRailtie < Rails::Railtie
|
22
|
+
|
23
|
+
initializer "tcell.sensors" do |app|
|
24
|
+
ActiveSupport.on_load :action_controller do
|
25
|
+
ActionController::Base.send(:include, TCellAgent::CsrfExceptionReporter)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
data/lib/tcell_agent/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tcell_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garrett
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|