From e3d359cafab3541d0ad3fdb138dba5bd4bdee40f Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Mon, 15 Feb 2010 12:36:32 -0500 Subject: import release 0.03 --- Changes | 3 +++ lib/DJabberd/Plugin/VCard/LDAP.pm | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index 4830aab..0bff132 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for DJabberd-VCard-LDAP +0.03 2007-09-04 + Make sure to Base64 encode the jpegPhoto + 0.02 2007-08-23 More complete vCard. Support substituting domain as well as userid in filter diff --git a/lib/DJabberd/Plugin/VCard/LDAP.pm b/lib/DJabberd/Plugin/VCard/LDAP.pm index 63a2a6a..1320dd8 100644 --- a/lib/DJabberd/Plugin/VCard/LDAP.pm +++ b/lib/DJabberd/Plugin/VCard/LDAP.pm @@ -6,6 +6,7 @@ use strict; use base 'DJabberd::Plugin::VCard'; use Net::LDAP; +use MIME::Base64; our $logger = DJabberd::Log->get_logger(); @@ -15,11 +16,11 @@ DJabberd::VCard::LDAP - LDAP VCard Provider for DJabberd =head1 VERSION -Version 0.02 +Version 0.03 =cut -our $VERSION = '0.02'; +our $VERSION = '0.03'; =head1 SYNOPSIS @@ -120,7 +121,7 @@ sub load_vcard { my $entry = $srch->entry(0); my $photo = $entry->get_value('jpegPhoto'); if (defined $photo) { - $photo = ''.$photo.''; + $photo = ''.encode_base64($photo).''; } else { $photo = ''; } @@ -155,7 +156,6 @@ sub load_vcard { .$photo .''._isdef($entry->get_value('description')).'' .''; - $logger->info($vCard); undef($entry); undef($srch); return $vCard; -- cgit