logjam_agent 0.24.4 → 0.24.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logjam_agent/rack/logger.rb +11 -1
- data/lib/logjam_agent/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f395c05abbfa60c7d42c950044ddcb90a5d2c7a9
|
4
|
+
data.tar.gz: 4386f7e6e3b363f83a3f93c7d6e481297923edde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2193e34a5a843a31e0177c5baab5eeb4d755f842a8cf093d489611c694dae4feb541c773171fe0ec2eccdb008287572dbd9227cfce64bba09bca9e010d925e4
|
7
|
+
data.tar.gz: ded1b8f4781a201839ee1fa95cbe3feac79265be24c8a320c22e93e7bde0908509942da01a89109c4ad9710f82833a74b8a6507b83496f72e7583673cce1522d
|
@@ -83,11 +83,21 @@ module LogjamAgent
|
|
83
83
|
|
84
84
|
logjam_request.start_time = start_time
|
85
85
|
logjam_fields = logjam_request.fields
|
86
|
-
|
86
|
+
spoofed = nil
|
87
|
+
ip = nil
|
88
|
+
begin
|
89
|
+
ip = LogjamAgent.ip_obfuscator(env["action_dispatch.remote_ip"].to_s)
|
90
|
+
rescue IpSpoofAttackError => spoofed
|
91
|
+
ip = "*** SPOOFED IP ***"
|
92
|
+
end
|
87
93
|
logjam_fields.merge!(:ip => ip, :host => @hostname)
|
88
94
|
logjam_fields.merge!(extract_request_info(request))
|
89
95
|
|
90
96
|
info "Started #{request.request_method} \"#{path}\" for #{ip} at #{start_time.to_default_s}" unless logjam_request.ignored?
|
97
|
+
if spoofed
|
98
|
+
error spoofed
|
99
|
+
raise spoofed
|
100
|
+
end
|
91
101
|
end
|
92
102
|
|
93
103
|
def after_dispatch(env, result, run_time_ms, wait_time_ms)
|
data/lib/logjam_agent/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logjam_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.24.
|
4
|
+
version: 0.24.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Kaes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|