incline_ldap 0.1.1 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37bfcb6c7e5e530989ba3bde1834af9b36979de3
4
- data.tar.gz: 0b48332d9b5e0257ae0c3370800f9d0d2ebe9a4d
3
+ metadata.gz: 8c2e8e2c04c136798db6dd01755d370923bf2aab
4
+ data.tar.gz: 84998ed6f880f5cdea67f182547f2a4f2610104e
5
5
  SHA512:
6
- metadata.gz: 508731fc38ff8024680871c2e243f3831ad8e544900ec47e6bbd0ed392e4abd0f373d5ea4d470a757b3a49edc16db6695c3fb8743c66ab87676520357bc242ee
7
- data.tar.gz: 993ac522658e546b77db483254ce86d90f9da3ba7879d60183c008efc489399dbbf38c9b5c9e3f6b59f6b3e0ba55e4792fe97aada91c25f13904db14d9deffe3
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
- entry = @ldap.bind_as(filter: ldap_filter, password: password)
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
@@ -1,3 +1,3 @@
1
1
  module InclineLdap
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -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.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-07-13 00:00:00.000000000 Z
11
+ date: 2017-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: incline