lib/amazon/ecs.rb in willnet-amazon-ecs-0.5.5 vs lib/amazon/ecs.rb in willnet-amazon-ecs-0.5.6

- old
+ new

@@ -204,16 +204,16 @@ end qs.reject! do |k,v| v.to_s.empty? end qs.sort! qs.map! do |k,v| v = v.join(',') if v.is_a? Array - [k, CGI.escape(v.to_s)] * "=" + [k, URI.escape(v.to_s, /[^a-zA-z\d_.-]/)] * "=" end qs = qs * "&" uri = URI.parse(request_url + "?" + qs) msg = [ 'GET', uri.host, uri.path, uri.query ].join("\n") dig = hmac_sha256(secret_access_key, msg) - sig = CGI.escape(Base64.encode64(dig).chomp) + sig = URI.escape(Base64.encode64(dig).chomp, /[^a-zA-z\d_.-]/) "#{request_url}?#{qs}&Signature=#{sig}" end IPAD = "\x36" OPAD = "\x5c"