summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Moll <mmoll@FreeBSD.org>2015-05-26 18:05:44 +0000
committerMichael Moll <mmoll@FreeBSD.org>2015-05-26 18:05:44 +0000
commit5b02f5bb047c27c25a744e79bf3c931ed1768018 (patch)
treeb555b789e907e76c36f5f7c2e98afd2da9b2cf5d
parentwww/redmine: allow newer net-ldap versions (diff)
net/rubygem-net-ldap: update to 0.11
PR: 199945 Differential Revision: https://reviews.freebsd.org/D2633 Submitted by: Michael Fausten <ports@michael-fausten.de> Approved by: mat (mentor)
Notes
Notes: svn path=/head/; revision=387502
-rw-r--r--net/rubygem-net-ldap/Makefile7
-rw-r--r--net/rubygem-net-ldap/distinfo4
-rw-r--r--net/rubygem-net-ldap/files/patch-CVE-2014-008355
-rw-r--r--net/rubygem-net-ldap/files/patch-ruby1915
4 files changed, 6 insertions, 75 deletions
diff --git a/net/rubygem-net-ldap/Makefile b/net/rubygem-net-ldap/Makefile
index b43c602dacf5..b214e3d1961a 100644
--- a/net/rubygem-net-ldap/Makefile
+++ b/net/rubygem-net-ldap/Makefile
@@ -2,16 +2,17 @@
# $FreeBSD$
PORTNAME= net-ldap
-PORTVERSION= 0.3.1
-PORTREVISION= 2
+PORTVERSION= 0.11
CATEGORIES= net rubygems
MASTER_SITES= RG
MAINTAINER= ruby@FreeBSD.org
COMMENT= Pure Ruby LDAP support library with most client features
-USE_RUBY= yes
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/License.rdoc
+USE_RUBY= yes
USE_RUBYGEMS= yes
RUBYGEM_AUTOPLIST= yes
diff --git a/net/rubygem-net-ldap/distinfo b/net/rubygem-net-ldap/distinfo
index f991b575fe3c..2b5c1b8d68b9 100644
--- a/net/rubygem-net-ldap/distinfo
+++ b/net/rubygem-net-ldap/distinfo
@@ -1,2 +1,2 @@
-SHA256 (rubygem/net-ldap-0.3.1.gem) = 953551665fb0d398740a72a26314c6d34bd70fa35419c96dc58351f17d9a5081
-SIZE (rubygem/net-ldap-0.3.1.gem) = 66048
+SHA256 (rubygem/net-ldap-0.11.gem) = fc5487b0c81cbf2beaede0e6c07af036559deb4ab6df185f61ac16562949d8f5
+SIZE (rubygem/net-ldap-0.11.gem) = 87040
diff --git a/net/rubygem-net-ldap/files/patch-CVE-2014-0083 b/net/rubygem-net-ldap/files/patch-CVE-2014-0083
deleted file mode 100644
index 885eb385d44c..000000000000
--- a/net/rubygem-net-ldap/files/patch-CVE-2014-0083
+++ /dev/null
@@ -1,55 +0,0 @@
---- lib/net/ldap/password.rb.orig 2014-02-13 17:28:50.000000000 -0800
-+++ lib/net/ldap/password.rb 2014-02-13 17:29:06.000000000 -0800
-@@ -1,31 +1,38 @@
- # -*- ruby encoding: utf-8 -*-
- require 'digest/sha1'
- require 'digest/md5'
-+require 'base64'
-+require 'securerandom'
-
- class Net::LDAP::Password
- class << self
- # Generate a password-hash suitable for inclusion in an LDAP attribute.
-- # Pass a hash type (currently supported: :md5 and :sha) and a plaintext
-+ # Pass a hash type as a symbol (:md5, :sha, :ssha) and a plaintext
- # password. This function will return a hashed representation.
- #
- #--
- # STUB: This is here to fulfill the requirements of an RFC, which
- # one?
- #
-- # TODO, gotta do salted-sha and (maybe)salted-md5. Should we provide
-- # sha1 as a synonym for sha1? I vote no because then should you also
-- # provide ssha1 for symmetry?
-+ # TODO:
-+ # * maybe salted-md5
-+ # * Should we provide sha1 as a synonym for sha1? I vote no because then
-+ # should you also provide ssha1 for symmetry?
-+ #
-+ attribute_value = ""
- def generate(type, str)
-- digest, digest_name = case type
-- when :md5
-- [Digest::MD5.new, 'MD5']
-- when :sha
-- [Digest::SHA1.new, 'SHA']
-- else
-- raise Net::LDAP::LdapError, "Unsupported password-hash type (#{type})"
-- end
-- digest << str.to_s
-- return "{#{digest_name}}#{[digest.digest].pack('m').chomp }"
-+ case type
-+ when :md5
-+ attribute_value = '{MD5}' + Base64.encode64(Digest::MD5.digest(str)).chomp!
-+ when :sha
-+ attribute_value = '{SHA}' + Base64.encode64(Digest::SHA1.digest(str)).chomp!
-+ when :ssha
-+ salt = SecureRandom.random_bytes(16)
-+ attribute_value = '{SSHA}' + Base64.encode64(Digest::SHA1.digest(str + salt) + salt).chomp!
-+ else
-+ raise Net::LDAP::LdapError, "Unsupported password-hash type (#{type})"
-+ end
-+ return attribute_value
- end
- end
- end
diff --git a/net/rubygem-net-ldap/files/patch-ruby19 b/net/rubygem-net-ldap/files/patch-ruby19
deleted file mode 100644
index 6f7a6e25fb59..000000000000
--- a/net/rubygem-net-ldap/files/patch-ruby19
+++ /dev/null
@@ -1,15 +0,0 @@
---- lib/net/ber/core_ext/string.rb
-+++ lib/net/ber/core_ext/string.rb
-@@ -20,7 +20,11 @@ def raw_utf8_encoded
- if self.respond_to?(:encode)
- # Strings should be UTF-8 encoded according to LDAP.
- # However, the BER code is not necessarily valid UTF-8
-- self.encode('UTF-8').force_encoding('ASCII-8BIT')
-+ begin
-+ self.encode('UTF-8').force_encoding('ASCII-8BIT')
-+ rescue Encoding::UndefinedConversionError
-+ self
-+ end
- else
- self
- end