KMS::Client.decrypt StringIO to String conversion errors since v2.0.15
Closed this issue · 2 comments
tim-george commented
Since v2.0.15 all calls to KMS::Client.decrypt are failing with conversion errors.
My guess is that in light of the change to aws-sdk-core/lib/seahorse/client/param_converter.rb:203, aws-sdk-core/lib/aws-sdk-core/json/builder.rb:54 might need to be changed from "value" to "value.read".
Best illustrated with the following:
irb(main):003:0> Aws::KMS::Client.new.decrypt(ciphertext_blob: "")
TypeError: can't convert StringIO into String
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/1.9.1/base64.rb:65:in `pack'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/1.9.1/base64.rb:65:in `strict_encode64'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/aws-sdk-core/json/builder.rb:54:in `format'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/aws-sdk-core/json/builder.rb:24:in `block in structure'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/aws-sdk-core/json/builder.rb:20:in `each'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/aws-sdk-core/json/builder.rb:20:in `with_object'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/aws-sdk-core/json/builder.rb:20:in `structure'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/aws-sdk-core/json/builder.rb:50:in `format'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/aws-sdk-core/json/builder.rb:11:in `to_json'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/aws-sdk-core/json/rpc_body_handler.rb:20:in `build_json'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/aws-sdk-core/json/rpc_body_handler.rb:8:in `call'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/aws-sdk-core/json/rpc_headers_handler.rb:10:in `call'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/aws-sdk-core/plugins/user_agent.rb:12:in `call'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/seahorse/client/plugins/restful_bindings.rb:13:in `call'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/seahorse/client/plugins/endpoint.rb:35:in `call'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/seahorse/client/plugins/param_validation.rb:22:in `call'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/seahorse/client/plugins/raise_response_errors.rb:14:in `call'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/seahorse/client/plugins/param_conversion.rb:22:in `call'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/aws-sdk-core/plugins/response_paging.rb:10:in `call'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/seahorse/client/request.rb:70:in `send_request'
from /home/tjg/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.15/lib/seahorse/client/base.rb:215:in `block (2 levels) in define_operation_methods'
from (irb):3
from /home/tjg/.rbenv/versions/1.9.3-p547/bin/irb:12:in `<main>'irb(main):004:0>
trevorrowe commented
Closed by #180.
trevorrowe commented
This has been resolved the fix is available in 2.0.17.