net-ldap 0.16.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of net-ldap might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/History.rdoc +4 -0
- data/lib/net/ldap/connection.rb +5 -5
- data/lib/net/ldap/version.rb +1 -1
- data/test/integration/test_password_modify.rb +14 -1
- metadata +20 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd6f9335c52e3019675ba1733ce49135ffe54da7
|
4
|
+
data.tar.gz: 6fbe8f791d39bf5934125393bf9eb9ae66351e06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecd3d8ce429ece15a44b9034e7626ddae80112539311b3992c424ac2c26d440d38d829b3d61eb6cc5d425ab5457231863895f32781cd30cb5f346e3c5bedb87d
|
7
|
+
data.tar.gz: 19300497d3d524dbe8a7658f2e21c92c92380143bc06cf4d5a0928724828b55bbc9515333c9f291459d9a62b95e6049e8e8ca8412538023340c8c3f98e9e8ffe
|
data/History.rdoc
CHANGED
data/lib/net/ldap/connection.rb
CHANGED
@@ -592,11 +592,11 @@ class Net::LDAP::Connection #:nodoc:
|
|
592
592
|
|
593
593
|
ext_seq = [Net::LDAP::PasswdModifyOid.to_ber_contextspecific(0)]
|
594
594
|
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
595
|
+
pwd_seq = []
|
596
|
+
pwd_seq << dn.to_ber(0x80)
|
597
|
+
pwd_seq << args[:old_password].to_ber(0x81) unless args[:old_password].nil?
|
598
|
+
pwd_seq << args[:new_password].to_ber(0x82) unless args[:new_password].nil?
|
599
|
+
ext_seq << pwd_seq.to_ber_sequence.to_ber(0x81)
|
600
600
|
|
601
601
|
request = ext_seq.to_ber_appsequence(Net::LDAP::PDU::ExtendedRequest)
|
602
602
|
|
data/lib/net/ldap/version.rb
CHANGED
@@ -3,7 +3,8 @@ require_relative '../test_helper'
|
|
3
3
|
class TestPasswordModifyIntegration < LDAPIntegrationTestCase
|
4
4
|
def setup
|
5
5
|
super
|
6
|
-
@
|
6
|
+
@admin_account = {dn: 'cn=admin,dc=rubyldap,dc=com', password: 'passworD1', method: :simple}
|
7
|
+
@ldap.authenticate @admin_account[:dn], @admin_account[:password]
|
7
8
|
|
8
9
|
@dn = 'uid=modify-password-user1,ou=People,dc=rubyldap,dc=com'
|
9
10
|
|
@@ -74,6 +75,18 @@ class TestPasswordModifyIntegration < LDAPIntegrationTestCase
|
|
74
75
|
'New password should be valid'
|
75
76
|
end
|
76
77
|
|
78
|
+
def test_password_modify_overwrite_old_password
|
79
|
+
assert @ldap.password_modify(dn: @dn,
|
80
|
+
auth: @admin_account,
|
81
|
+
new_password: 'passworD3')
|
82
|
+
|
83
|
+
refute @ldap.bind(username: @dn, password: 'passworD1', method: :simple),
|
84
|
+
'Old password should no longer be valid'
|
85
|
+
|
86
|
+
assert @ldap.bind(username: @dn, password: 'passworD3', method: :simple),
|
87
|
+
'New password should be valid'
|
88
|
+
end
|
89
|
+
|
77
90
|
def teardown
|
78
91
|
@ldap.delete dn: @dn
|
79
92
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-ldap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francis Cianfrocca
|
@@ -13,76 +13,76 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2017-
|
16
|
+
date: 2017-10-31 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: flexmock
|
20
20
|
requirement: !ruby/object:Gem::Requirement
|
21
21
|
requirements:
|
22
|
-
- -
|
22
|
+
- - ~>
|
23
23
|
- !ruby/object:Gem::Version
|
24
24
|
version: '1.3'
|
25
25
|
type: :development
|
26
26
|
prerelease: false
|
27
27
|
version_requirements: !ruby/object:Gem::Requirement
|
28
28
|
requirements:
|
29
|
-
- -
|
29
|
+
- - ~>
|
30
30
|
- !ruby/object:Gem::Version
|
31
31
|
version: '1.3'
|
32
32
|
- !ruby/object:Gem::Dependency
|
33
33
|
name: rake
|
34
34
|
requirement: !ruby/object:Gem::Requirement
|
35
35
|
requirements:
|
36
|
-
- -
|
36
|
+
- - ~>
|
37
37
|
- !ruby/object:Gem::Version
|
38
38
|
version: '10.0'
|
39
39
|
type: :development
|
40
40
|
prerelease: false
|
41
41
|
version_requirements: !ruby/object:Gem::Requirement
|
42
42
|
requirements:
|
43
|
-
- -
|
43
|
+
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '10.0'
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: rubocop
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|
50
|
-
- -
|
50
|
+
- - ~>
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 0.42.0
|
53
53
|
type: :development
|
54
54
|
prerelease: false
|
55
55
|
version_requirements: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- -
|
57
|
+
- - ~>
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: 0.42.0
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
61
|
name: test-unit
|
62
62
|
requirement: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
|
-
- -
|
64
|
+
- - '>='
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '0'
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
69
|
version_requirements: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
|
-
- -
|
71
|
+
- - '>='
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0'
|
74
74
|
- !ruby/object:Gem::Dependency
|
75
75
|
name: byebug
|
76
76
|
requirement: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
|
-
- -
|
78
|
+
- - '>='
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0'
|
81
81
|
type: :development
|
82
82
|
prerelease: false
|
83
83
|
version_requirements: !ruby/object:Gem::Requirement
|
84
84
|
requirements:
|
85
|
-
- -
|
85
|
+
- - '>='
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '0'
|
88
88
|
description: |-
|
@@ -112,10 +112,10 @@ extra_rdoc_files:
|
|
112
112
|
- License.rdoc
|
113
113
|
- README.rdoc
|
114
114
|
files:
|
115
|
-
-
|
116
|
-
-
|
117
|
-
-
|
118
|
-
-
|
115
|
+
- .gitignore
|
116
|
+
- .rubocop.yml
|
117
|
+
- .rubocop_todo.yml
|
118
|
+
- .travis.yml
|
119
119
|
- CONTRIBUTING.md
|
120
120
|
- Contributors.rdoc
|
121
121
|
- Gemfile
|
@@ -199,23 +199,23 @@ licenses:
|
|
199
199
|
metadata: {}
|
200
200
|
post_install_message:
|
201
201
|
rdoc_options:
|
202
|
-
-
|
202
|
+
- --main
|
203
203
|
- README.rdoc
|
204
204
|
require_paths:
|
205
205
|
- lib
|
206
206
|
required_ruby_version: !ruby/object:Gem::Requirement
|
207
207
|
requirements:
|
208
|
-
- -
|
208
|
+
- - '>='
|
209
209
|
- !ruby/object:Gem::Version
|
210
210
|
version: 2.0.0
|
211
211
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
|
-
- -
|
213
|
+
- - '>='
|
214
214
|
- !ruby/object:Gem::Version
|
215
215
|
version: '0'
|
216
216
|
requirements: []
|
217
217
|
rubyforge_project:
|
218
|
-
rubygems_version: 2.
|
218
|
+
rubygems_version: 2.0.14.1
|
219
219
|
signing_key:
|
220
220
|
specification_version: 4
|
221
221
|
summary: Net::LDAP for Ruby (also called net-ldap) implements client access for the
|