opennebula 5.4.0 → 5.4.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: ca8e48dff96a619344f9f0ecc9898d159e755bee
4
- data.tar.gz: 4991ad72e4dc6de08a4df646804e6ba07d8cecc5
3
+ metadata.gz: 431c4988cf999d8a9df28c42f9d09823b7936d7a
4
+ data.tar.gz: d88e09f974fa057c7f5c58ef132c252d4b4aff35
5
5
  SHA512:
6
- metadata.gz: 3a8202519ce9a8183a0dbfcc50a70513c26fff537c3962e2a6c81d24415a88f898fe8c1d3a8c8e89229556ff50eb400496e942b97d08b69d37a2cab9ae2786b5
7
- data.tar.gz: eae3a740d5e3f1b43a92a05640d8985be8279d03e7a943f6631b0858adbcadd136efa23f4dfce170fa457ff7b59437cd334a67c31269609fc8fe84b3e7c67136
6
+ metadata.gz: 5ea99cea006d15c16544c289f979367146eac1a9e64880cbd51b4e3ca7dbb8545232317f0490485fc54cb62ef49439ec3ef00dce0b04e959dcb5f413953751fe
7
+ data.tar.gz: 32e3c9ce684dfd4583dbc288072f7decc0805c94591787653e2802b222bc2dea3650bdebac19eeacb088917e648aaf0fc19c45a19f603ba0cf1b2ef34f5c3f59
@@ -50,7 +50,7 @@ end
50
50
  module CloudClient
51
51
 
52
52
  # OpenNebula version
53
- VERSION = '5.4.0'
53
+ VERSION = '5.4.1'
54
54
 
55
55
  # #########################################################################
56
56
  # Default location for the authentication file
@@ -127,7 +127,7 @@ class OpenNebula::LdapAuth
127
127
 
128
128
  def find_user(name)
129
129
  begin
130
- filter = "#{@options[:user_field]}=#{escape(name)}"
130
+ filter = Net::LDAP::Filter.eq(@options[:user_field], escape(name))
131
131
 
132
132
  result = @ldap.search(
133
133
  :base => @options[:base],
@@ -155,10 +155,11 @@ class OpenNebula::LdapAuth
155
155
  end
156
156
 
157
157
  def is_in_group?(user, group)
158
+ username = user.first.force_encoding(Encoding::UTF_8)
158
159
  result=@ldap.search(
159
160
  :base => group,
160
161
  :attributes => [@options[:group_field]],
161
- :filter => "(#{@options[:group_field]}=#{user.first})")
162
+ :filter => "(#{@options[:group_field]}=#{username})")
162
163
 
163
164
  if result && result.first
164
165
  true
@@ -196,7 +197,7 @@ class OpenNebula::LdapAuth
196
197
  filter = "(#{@options[:group_field]}=#{@user[@options[:user_field]].first})"
197
198
  @ldap.search(
198
199
  :base => @options[:base],
199
- :attributes => "dn",
200
+ :attributes => [ "dn" ],
200
201
  :filter => filter
201
202
  ) do |entry|
202
203
  if @mapping[entry.dn]
@@ -228,4 +229,3 @@ private
228
229
  string.gsub(FILTER_ESCAPE_RE) { |char| "\\" + FILTER_ESCAPES[char] }
229
230
  end
230
231
  end
231
-
data/lib/opennebula.rb CHANGED
@@ -69,5 +69,5 @@ require 'opennebula/vm_group_pool'
69
69
  module OpenNebula
70
70
 
71
71
  # OpenNebula version
72
- VERSION = '5.4.0'
72
+ VERSION = '5.4.1'
73
73
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opennebula
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.0
4
+ version: 5.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-19 00:00:00.000000000 Z
11
+ date: 2017-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri