sentry-raven 2.5.2 → 2.5.3

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: 8f2422a456dddbcdb05509facf1a0400cc44ef8f
4
- data.tar.gz: d667b94c20aed7fde0da01ce6f3f4454a446a940
3
+ metadata.gz: 70b9abf6b93e96df6d2be4056417be002fdd5fc3
4
+ data.tar.gz: 6c74a0b9414e202c40f51da20914ce7b135c0961
5
5
  SHA512:
6
- metadata.gz: 36d2ca471cbd4fd308c4002cb583eb373663148f05aca53a9134190d978aa0c2d53d52cecac65f490e00541c77a49e0298a9aae87d86f55f43044ef2ba78b261
7
- data.tar.gz: 5a1d82e722e0e427029b2537601d84ce535c5cf2f3fd98eca08fc6d178d0ddcedc8e90642fc373cd2ec4a0cb6f5d0e0b8a2c3ddb89f287ad81126224e95f4261
6
+ metadata.gz: 4498c19ed966bed8a2ea43773f01f7b587896cd434ce702e2d2f7c34fbcd902fa369ab75218b575e2468cc87b11634588a1f70a24078c966f14ae12da74d2207
7
+ data.tar.gz: 807dd7e9185458135d27777acc47eba17b5671a03dc90e4cc29015e8b683bb9ce51225e9c645c755e0c0d76b0cd07d7ea0a13b87d612b8638d56c91bc7383a1d
data/changelog.md CHANGED
@@ -1,3 +1,8 @@
1
+ 2.5.3
2
+ -----
3
+
4
+ * BUGFIX: Deal properly with ASCII_8BIT/BINARY encodings [#689, #696, @nateberkopec]
5
+
1
6
  2.5.2
2
7
  -----
3
8
 
@@ -18,6 +18,13 @@ module Raven
18
18
  clean_exc.set_backtrace(value.backtrace)
19
19
  clean_exc
20
20
  when String
21
+ # Encoding::BINARY / Encoding::ASCII_8BIT is a special binary encoding.
22
+ # valid_encoding? will always return true because it contains all codepoints,
23
+ # so instead we check if it only contains actual ASCII codepoints, and if
24
+ # not we assume it's actually just UTF8 and scrub accordingly.
25
+ if value.encoding == Encoding::BINARY && !value.ascii_only?
26
+ value.force_encoding(Encoding::UTF_8)
27
+ end
21
28
  return value if value.valid_encoding?
22
29
  remove_invalid_bytes(value)
23
30
  else
data/lib/raven/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Raven
3
3
  # Freezing this constant breaks in 1.9.x
4
- VERSION = "2.5.2" # rubocop:disable Style/MutableConstant
4
+ VERSION = "2.5.3" # rubocop:disable Style/MutableConstant
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry-raven
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.2
4
+ version: 2.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sentry Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-05 00:00:00.000000000 Z
11
+ date: 2017-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday