net-ldap 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of net-ldap might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 38e2a66893eef1d93e64fda3d84dc70e51b504f2
4
- data.tar.gz: e15b5c72e9fd9a38fcf058a9c432e77320d3fcb7
3
+ metadata.gz: a47b6efa59b2892c7ea4a3190a27229760a247cc
4
+ data.tar.gz: 27507d365922380692a39a21591f261ba4018f7e
5
5
  SHA512:
6
- metadata.gz: 6bae92818e1c80d15b731d5f8b28ec39f332a0359e8eed3c704e7b4606d5c3ce8f29a7a46bb511b2963a2c30f8085529431a1bcef6780db09f018dd61049ff74
7
- data.tar.gz: 7277e94a5fcd96fa2cf53e32727ac67b7a8feef5fb7f12190b5fc4dcf1c1c07d0f62a398daa726d776c988372308b1e964a54b0241312515d243a5f88709be41
6
+ metadata.gz: b7e65bc04287ee0c11aef0f254ad0ee22645c4059bc73d1b74a8f3d9152befff329e7d37e8242f96ac91f4ab5a1a7383cca2d1f00b2f8e94e3e3122bebb7fad9
7
+ data.tar.gz: d2755430f168d608049fce1a3b552a33cd55225e7f1a5244049202991c0bfc406971faae766a516591c80299be6bb4f1cc653401b7aa0b2e927e0818f1df0540
@@ -2,6 +2,7 @@
2
2
  require 'digest/sha1'
3
3
  require 'digest/md5'
4
4
  require 'base64'
5
+ require 'securerandom'
5
6
 
6
7
  class Net::LDAP::Password
7
8
  class << self
@@ -26,7 +27,7 @@ class Net::LDAP::Password
26
27
  when :sha
27
28
  attribute_value = '{SHA}' + Base64.encode64(Digest::SHA1.digest(str)).chomp!
28
29
  when :ssha
29
- srand; salt = (rand * 1000).to_i.to_s
30
+ salt = SecureRandom.random_bytes(16)
30
31
  attribute_value = '{SSHA}' + Base64.encode64(Digest::SHA1.digest(str + salt) + salt).chomp!
31
32
  else
32
33
  raise Net::LDAP::LdapError, "Unsupported password-hash type (#{type})"
@@ -1,5 +1,5 @@
1
1
  module Net
2
2
  class LDAP
3
- VERSION = "0.5.1"
3
+ VERSION = "0.6.0"
4
4
  end
5
5
  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.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francis Cianfrocca
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2014-03-19 00:00:00.000000000 Z
16
+ date: 2014-04-07 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: rdoc