incline_ldap 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/incline_ldap/auth_engine.rb +2 -1
- data/lib/incline_ldap/version.rb +1 -1
- data/test/incline_ldap_test.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c2e8e2c04c136798db6dd01755d370923bf2aab
|
4
|
+
data.tar.gz: 84998ed6f880f5cdea67f182547f2a4f2610104e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 238ede08da9ebe128d70b57bd81967aa7e353da4fe408efbc27959543bd31ff8213fc847edc709d05fb7bbc7526e42aa4a592496c37243e451bb4faaf011be98
|
7
|
+
data.tar.gz: 24f0ce2c16e6be655143e70821c4eca87388cc078729d41f033baa12ceff6458dd87a704a1638f4a338fc49ad8ae4d8fa16cddc9e397b9f34d792e496a6aeab0
|
@@ -168,7 +168,8 @@ module InclineLdap
|
|
168
168
|
add_failure_to user, '(LDAP) account disabled', client_ip
|
169
169
|
return nil
|
170
170
|
end
|
171
|
-
|
171
|
+
# blank passwords are always invalid.
|
172
|
+
entry = password.to_s.strip == '' ? nil : @ldap.bind_as(filter: ldap_filter, password: password)
|
172
173
|
if entry && entry.count == 1
|
173
174
|
add_success_to user, '(LDAP)', client_ip
|
174
175
|
return user
|
data/lib/incline_ldap/version.rb
CHANGED
data/test/incline_ldap_test.rb
CHANGED
@@ -15,6 +15,14 @@ class InclineLdapTest < Minitest::Test
|
|
15
15
|
}
|
16
16
|
end
|
17
17
|
|
18
|
+
def test_should_not_authenticate_without_password
|
19
|
+
aa = InclineLdap::AuthEngine.new(@config)
|
20
|
+
euler = 'euler@ldap.forumsys.com'
|
21
|
+
|
22
|
+
assert aa
|
23
|
+
assert_nil aa.authenticate(euler, '', '127.0.0.1')
|
24
|
+
end
|
25
|
+
|
18
26
|
def test_should_connect_and_authenticate
|
19
27
|
aa = InclineLdap::AuthEngine.new(@config)
|
20
28
|
euler = 'euler@ldap.forumsys.com'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: incline_ldap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Beau Barker
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: incline
|