rack-request_police 0.0.1alpha → 0.0.2alpha

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: b0e36c2e22df4b342dbc2b60f234de136cab4e5b
4
- data.tar.gz: 534a58f32183ad3319a029efd94e59bf89877558
3
+ metadata.gz: b2a52c5c86d8e26cb59e35182aa408dbe54b2ab2
4
+ data.tar.gz: 55886777b2b8bd0b6f98404fea8e1f4dd6366340
5
5
  SHA512:
6
- metadata.gz: 11fd8b55d68d44d1dff25a1062472f39b1b9cfc96fe0646835c578dd49157c2615630c0ebb01d107c3fca361d9b7349bf1c4c2c15854411f593c03bf78e1014d
7
- data.tar.gz: 949d05dda8d405ebc2227463a3aadfefd6ba34d1ee95e16d8928488f075b36fc7f369e93048931c0f8bc0f1054457eec73b62dfe7988851360d184b17d41e4a8
6
+ metadata.gz: 3fa3502d9c55f9fa32bb2c6b4bb8cf2e4a5f5c10decc36937dd09e8a61aa209e88cef0170e7bb981f4a356845e1cd7ab9e4eaf0bc362637024dd75a3a3c20270
7
+ data.tar.gz: ad73e34f990fc84b127607d188af98fd2bb7b7277dc9039858143e30c5f4b1099d46f36da9b887af9910a421347a1af7262d16fcb1b9c1b405181df3f0d85bcc
@@ -23,7 +23,7 @@ module Rack
23
23
  }
24
24
 
25
25
  if %w(POST PATCH DELETE).include?(env['REQUEST_METHOD'])
26
- request_params.merge!('data' => env['rack.input'].gets)
26
+ request_params.merge!('data' => env['rack.input'].read)
27
27
  end
28
28
  ::Rack::RequestPolice.storage.log_request(request_params)
29
29
  end
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module RequestPolice
3
- VERSION = "0.0.1alpha"
3
+ VERSION = "0.0.2alpha"
4
4
  end
5
5
  end
@@ -29,6 +29,10 @@ module Rack
29
29
  def root_path
30
30
  "#{env['SCRIPT_NAME']}/"
31
31
  end
32
+
33
+ def escape(text)
34
+ ::Rack::Utils.escape_html(text)
35
+ end
32
36
  end
33
37
  end
34
38
  end
data/web/views/index.erb CHANGED
@@ -75,7 +75,7 @@
75
75
  <tr class="details" id="details_<%= idx %>">
76
76
  <td colspan="5">
77
77
  <pre>
78
- <%= log.data.inspect %>
78
+ <%= escape(log.data.inspect) %>
79
79
  </pre>
80
80
  </td>
81
81
  </tr>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-request_police
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1alpha
4
+ version: 0.0.2alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafał Wojsznis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-05 00:00:00.000000000 Z
11
+ date: 2015-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler