conjur-api 4.20.0 → 4.20.1

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: ebb00e2f94e68846848adb5a2cd1ab57ac5fc1a6
4
- data.tar.gz: 56489be115c5c8204ab84fd2985e6041384af5be
3
+ metadata.gz: 499e973eac8164648777759b0128f502ad692bb6
4
+ data.tar.gz: 6d85fe429b8d77cb7aaca33370c0bc48179e5345
5
5
  SHA512:
6
- metadata.gz: e03d90f9779f73f2fcdb366f72b5f23266072121a69e03c480be29796822e5048fb580fddb56a9b57c44c0a7084cd60de22b21f185f8e4c881aa1e1c678c05fd
7
- data.tar.gz: 40b2f4d6c81f5c38a97917526e8dd8fd6176fb53d1bf53deaddd902ac59d264dafdb8c30449c3f95c397964cef18ba722ca897685b025132702b35010303d10d
6
+ metadata.gz: fa2d3a7024f3d41e6e87f81873179a1528b5d9b6d0a5657a8e8c281d8368189b3db301d3b525d88697d049d44868bac8df6b26aa026d2da48e785ed62d4ab843
7
+ data.tar.gz: 301f2f79b84e3c8a3f13a2cdb21666d33e3cc80bc0e5144aa8974e19a248070d49c081d6ffaabc41c4b06925cbfce7b637a4b30a91b3aba36e94e12927a0c160
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # v4.20.1
2
+
3
+ * BUGFIX: Better handling for unicode and special characters in user ids.
4
+
1
5
  # v4.20.0
2
6
 
3
7
  * Add support for Host Factory functionality (replaces conjur-asset-host-factory plugin).
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Conjur
21
21
  class API
22
- VERSION = "4.20.0"
22
+ VERSION = "4.20.1"
23
23
  end
24
24
  end
@@ -33,7 +33,7 @@ module Conjur
33
33
  #
34
34
  class Annotations
35
35
  include Enumerable
36
-
36
+ include Conjur::Escape
37
37
  # Create an `Annotations` instance for the given {Conjur::Resource}.
38
38
  #
39
39
  # Note that you will generally use the {Conjur::Resource#annotations} method to get
@@ -161,7 +161,9 @@ module Conjur
161
161
  def update_annotation name, value
162
162
  @resource.invalidate do
163
163
  @annotations_hash = nil
164
- path = [@resource.account,'annotations', @resource.kind, @resource.identifier].join '/'
164
+ path = [@resource.account,'annotations', @resource.kind, @resource.identifier].map do |seg|
165
+ fully_escape(seg)
166
+ end.join('/')
165
167
  RestClient::Resource.new(Conjur::Authz::API.host, @resource.options)[path].put name: name, value: value
166
168
  end
167
169
  end
@@ -3,8 +3,9 @@ require 'helpers/request_helpers'
3
3
 
4
4
  describe Conjur::Annotations do
5
5
  include RequestHelpers
6
+ include Conjur::Escape
6
7
 
7
- let(:identifier){ 'the-resource-id' }
8
+ let(:identifier){ 'the-r{source}&^-id' }
8
9
  let(:kind){ 'some-kind' }
9
10
  let(:account){ 'the-account' }
10
11
  let(:resourceid){ [account, kind, identifier].join ':'}
@@ -23,7 +24,7 @@ describe Conjur::Annotations do
23
24
 
24
25
  subject { annotations }
25
26
 
26
- let(:url){ "#{Conjur::Authz::API.host}/#{account}/annotations/#{kind}/#{identifier}" }
27
+ let(:url){ "#{Conjur::Authz::API.host}/#{account}/annotations/#{kind}/#{fully_escape identifier}" }
27
28
 
28
29
  def expect_put_request url, payload
29
30
  expect_request(
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conjur-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.20.0
4
+ version: 4.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafal Rzepecki
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-02-05 00:00:00.000000000 Z
12
+ date: 2016-02-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client