From c3a712a4f79324943d10a4fafa6c45adb130719e Mon Sep 17 00:00:00 2001 From: skv Date: Wed, 11 Jun 2008 12:29:54 +0000 Subject: Fixes: 1. Support multivalue rel in (e.g. 2. Support numbers as keys in hmac. 3. Silence a warning. PR: ports/124272 Submitted by: Alex Kapranoff --- net/p5-Net-OpenID-Consumer/Makefile | 4 +++ net/p5-Net-OpenID-Consumer/files/patch-Consumer.pm | 29 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 net/p5-Net-OpenID-Consumer/files/patch-Consumer.pm diff --git a/net/p5-Net-OpenID-Consumer/Makefile b/net/p5-Net-OpenID-Consumer/Makefile index d652117745af..d9a6ced35bbc 100644 --- a/net/p5-Net-OpenID-Consumer/Makefile +++ b/net/p5-Net-OpenID-Consumer/Makefile @@ -7,6 +7,7 @@ PORTNAME= Net-OpenID-Consumer PORTVERSION= 0.14 +PORTREVISION= 1 CATEGORIES= net security perl5 MASTER_SITES= CPAN MASTER_SITE_SUBDIR= Net @@ -27,4 +28,7 @@ PERL_CONFIGURE= yes MAN3= Net::OpenID::Association.3 Net::OpenID::ClaimedIdentity.3 \ Net::OpenID::Consumer.3 Net::OpenID::VerifiedIdentity.3 +post-patch: + @${FIND} ${WRKSRC} -type f -name "*.orig" -delete + .include diff --git a/net/p5-Net-OpenID-Consumer/files/patch-Consumer.pm b/net/p5-Net-OpenID-Consumer/files/patch-Consumer.pm new file mode 100644 index 000000000000..cdd5ab0a05f8 --- /dev/null +++ b/net/p5-Net-OpenID-Consumer/files/patch-Consumer.pm @@ -0,0 +1,29 @@ +--- Consumer.pm 2007-08-04 02:38:53.000000000 +0400 ++++ lib/Net/OpenID/Consumer.pm 2008-06-04 19:10:37.000000000 +0400 +@@ -235,7 +235,7 @@ + # OpenID servers / delegated identities + # + if ($type eq "link" && +- $val =~ /\brel=.openid\.(server|delegate)./i && ($temp = $1) && ++ $val =~ /\brel=[\"\'][^\"\']*\bopenid\.(server|delegate)\b/i && ($temp = $1) && + $val =~ m!\bhref=[\"\']([^\"\']+)[\"\']!i) { + $ret->{"openid.$temp"} = $1; + next; +@@ -301,7 +301,8 @@ + $ret->{$k} =~ s/&(\w+);/$emap->{$1} || ""/eg; + } + +- $self->_debug("semantic info ($url) = " . join(", ", %$ret)); ++ $self->_debug("semantic info ($url) = " . join(", ", ++ map { defined($ret->{$_}) ? ($_ => $ret->{$_}) : () } keys %$ret)); + + return $ret; + } +@@ -543,6 +544,7 @@ + sub hmac { + my($data, $key, $hash_func, $block_size) = @_; + $block_size ||= 64; ++ $key = $key . ''; # stringify for charwise ^ to work + $key = &$hash_func($key) if length($key) > $block_size; + + my $k_ipad = $key ^ (chr(0x36) x $block_size); -- cgit