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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 17b73d4d2cddddb7ad88a522a0b224fe5116510c
4
- data.tar.gz: 8ab536c3bfcf28df31a8296bc66ffb9a3719615e
3
+ metadata.gz: f395c05abbfa60c7d42c950044ddcb90a5d2c7a9
4
+ data.tar.gz: 4386f7e6e3b363f83a3f93c7d6e481297923edde
5
5
  SHA512:
6
- metadata.gz: b435147ba4565aa36cbe4562037d2064295e81e1a44fee5e7cee2abc31c11f4a92aef58863875aeb427271fa859023cc283f72f99bdf538d07c607aee498d186
7
- data.tar.gz: 058ec490e616e80008abcd125e8c7f9be0af2a68092ce148da8657abdc3ae9d8a44c9706db564138007281a8d0253ecc1f75fa4ef06edcaee977dd58928de270
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
- ip = LogjamAgent.ip_obfuscator(env["action_dispatch.remote_ip"].to_s)
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)
@@ -1,3 +1,3 @@
1
1
  module LogjamAgent
2
- VERSION = "0.24.4"
2
+ VERSION = "0.24.5"
3
3
  end
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
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-09 00:00:00.000000000 Z
11
+ date: 2016-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake