logstash-filter-uuid 2.0.1 → 2.0.2

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: 35a7caa945d663e564973f781f2bf053c0e5e847
4
- data.tar.gz: 82bf213029a78dd20f1e3caf394aeb19e2767d18
3
+ metadata.gz: 5930214775592b7079dd4fae6bf23f39ffa12df7
4
+ data.tar.gz: 21faef12b514463c6bda443cac911c4c6ed2f195
5
5
  SHA512:
6
- metadata.gz: bb48216c0e8fe2c15004cc56b4c335cc7495c05c068b2ef12aa310c8b84fab2055a8066ff705a457d3b1544fa3eb4481b9a2b2c42a82a232503545f8076f0734
7
- data.tar.gz: acfe04559d773def9fff0b553d25c0d00f5b56ffda99eea3d0d790db2b0c6da536aa6a865248a809613a3c6a89c711456cac68ee820a6bd60352d28857d7019a
6
+ metadata.gz: 612c30dbdc5232f7a1aac0703a1cc49e288cda3b03950bbdd9e56075f302c471b350b02039d2f722d9b4d8cd07781fa1abc2deb62341ce682a3c80b06c347554
7
+ data.tar.gz: a4ab3398f7bbcb1da7d5b399ce571343748264a5b4c7c08eaba5211ccaab88bc94d1bace961417d607e1048827b8e3c80648c99452853f3104415f05eb487d11
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 2.0.2
2
+ - Force SecureRandom uuids to be UTF8 because that is what LogStash::Event accepts
3
+
1
4
  ## 2.0.0
2
5
  - Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
3
6
  instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
@@ -43,11 +43,13 @@ class LogStash::Filters::Uuid < LogStash::Filters::Base
43
43
  public
44
44
  def filter(event)
45
45
 
46
-
46
+ # SecureRandom.uuid returns a non UTF8 string and since
47
+ # only UTF8 strings can be passed to a LogStash::Event
48
+ # we need to reencode it here
47
49
  if overwrite
48
- event[target] = SecureRandom.uuid
50
+ event[target] = SecureRandom.uuid.force_encoding(Encoding::UTF_8)
49
51
  else
50
- event[target] ||= SecureRandom.uuid
52
+ event[target] ||= SecureRandom.uuid.force_encoding(Encoding::UTF_8)
51
53
  end
52
54
 
53
55
  filter_matched(event)
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-uuid'
4
- s.version = '2.0.1'
4
+ s.version = '2.0.2'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "The uuid filter allows you to add a UUID field to messages."
7
7
  s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-uuid
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic