diff --git a/CHANGELOG.md b/CHANGELOG.md index e25ad88..1e1c875 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ This project adheres to [Semantic Versioning](http://semver.org/). This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/) ## [Unreleased] +### Fixed +- Use strict Base64 encoding to fix base64 encoding/netty issue (@msblum) + ## [1.2.0] - 2017-05-03 ### Fixed - metrics-es-cluster.rb: Check to see if cluster key exists in transient_settings before trying to use it. (@RAR) diff --git a/bin/check-es-circuit-breakers.rb b/bin/check-es-circuit-breakers.rb index 3cee0eb..da98176 100755 --- a/bin/check-es-circuit-breakers.rb +++ b/bin/check-es-circuit-breakers.rb @@ -79,7 +79,7 @@ class ESCircuitBreaker < Sensu::Plugin::Check::CLI def get_es_resource(resource) headers = {} if config[:user] && config[:password] - auth = 'Basic ' + Base64.encode64("#{config[:user]}:#{config[:password]}").chomp + auth = 'Basic ' + Base64.strict_encode64("#{config[:user]}:#{config[:password]}").chomp headers = { 'Authorization' => auth } end diff --git a/bin/check-es-cluster-status.rb b/bin/check-es-cluster-status.rb index 5f88adc..10f13d4 100755 --- a/bin/check-es-cluster-status.rb +++ b/bin/check-es-cluster-status.rb @@ -86,7 +86,7 @@ class ESClusterStatus < Sensu::Plugin::Check::CLI def get_es_resource(resource) headers = {} if config[:user] && config[:password] - auth = 'Basic ' + Base64.encode64("#{config[:user]}:#{config[:password]}").chomp + auth = 'Basic ' + Base64.strict_encode64("#{config[:user]}:#{config[:password]}").chomp headers = { 'Authorization' => auth } end diff --git a/bin/check-es-file-descriptors.rb b/bin/check-es-file-descriptors.rb index 0a6deee..ccfa53c 100755 --- a/bin/check-es-file-descriptors.rb +++ b/bin/check-es-file-descriptors.rb @@ -85,7 +85,7 @@ class ESFileDescriptors < Sensu::Plugin::Check::CLI def get_es_resource(resource) headers = {} if config[:user] && config[:password] - auth = 'Basic ' + Base64.encode64("#{config[:user]}:#{config[:password]}").chomp + auth = 'Basic ' + Base64.strict_encode64("#{config[:user]}:#{config[:password]}").chomp headers = { 'Authorization' => auth } end diff --git a/bin/check-es-heap.rb b/bin/check-es-heap.rb index d547805..945a7ec 100755 --- a/bin/check-es-heap.rb +++ b/bin/check-es-heap.rb @@ -98,7 +98,7 @@ def acquire_es_version def acquire_es_resource(resource) headers = {} if config[:user] && config[:password] - auth = 'Basic ' + Base64.encode64("#{config[:user]}:#{config[:password]}").chomp + auth = 'Basic ' + Base64.strict_encode64("#{config[:user]}:#{config[:password]}").chomp headers = { 'Authorization' => auth } end diff --git a/bin/check-es-node-status.rb b/bin/check-es-node-status.rb index f3ef4ca..19fbf8d 100755 --- a/bin/check-es-node-status.rb +++ b/bin/check-es-node-status.rb @@ -71,7 +71,7 @@ class ESNodeStatus < Sensu::Plugin::Check::CLI def get_es_resource(resource) headers = {} if config[:user] && config[:password] - auth = 'Basic ' + Base64.encode64("#{config[:user]}:#{config[:password]}").chomp + auth = 'Basic ' + Base64.strict_encode64("#{config[:user]}:#{config[:password]}").chomp headers = { 'Authorization' => auth } end diff --git a/bin/metrics-es-cluster.rb b/bin/metrics-es-cluster.rb index 75a82c9..48f0e3d 100755 --- a/bin/metrics-es-cluster.rb +++ b/bin/metrics-es-cluster.rb @@ -98,7 +98,7 @@ def acquire_es_version def get_es_resource(resource) headers = {} if config[:user] && config[:password] - auth = 'Basic ' + Base64.encode64("#{config[:user]}:#{config[:password]}").chomp + auth = 'Basic ' + Base64.strict_encode64("#{config[:user]}:#{config[:password]}").chomp headers = { 'Authorization' => auth } end diff --git a/bin/metrics-es-node-graphite.rb b/bin/metrics-es-node-graphite.rb index 4a24dab..85f303e 100755 --- a/bin/metrics-es-node-graphite.rb +++ b/bin/metrics-es-node-graphite.rb @@ -118,7 +118,7 @@ class ESNodeGraphiteMetrics < Sensu::Plugin::Metric::CLI::Graphite def get_es_resource(resource) headers = {} if config[:user] && config[:password] - auth = 'Basic ' + Base64.encode64("#{config[:user]}:#{config[:password]}").chomp + auth = 'Basic ' + Base64.strict_encode64("#{config[:user]}:#{config[:password]}").chomp headers = { 'Authorization' => auth } end diff --git a/bin/metrics-es-node.rb b/bin/metrics-es-node.rb index da67e70..5b8e2f3 100755 --- a/bin/metrics-es-node.rb +++ b/bin/metrics-es-node.rb @@ -79,7 +79,7 @@ def acquire_es_version def get_es_resource(resource) headers = {} if config[:user] && config[:password] - auth = 'Basic ' + Base64.encode64("#{config[:user]}:#{config[:password]}").chomp + auth = 'Basic ' + Base64.strict_encode64("#{config[:user]}:#{config[:password]}").chomp headers = { 'Authorization' => auth } end