aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Edward Rudd 2010-02-15 12:36:32 -0500
committerGravatar Edward Rudd 2010-02-15 12:36:32 -0500
commite3d359cafab3541d0ad3fdb138dba5bd4bdee40f (patch)
treed38138877a007f8388ef19adee2cdb2ae2b6194a
parenta950ae0f077efd2477e60e8a8370fee07fe26b30 (diff)
import release 0.030.03
-rw-r--r--Changes3
-rw-r--r--lib/DJabberd/Plugin/VCard/LDAP.pm8
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 @@
1Revision history for DJabberd-VCard-LDAP 1Revision history for DJabberd-VCard-LDAP
2 2
30.03 2007-09-04
4 Make sure to Base64 encode the jpegPhoto
5
30.02 2007-08-23 60.02 2007-08-23
4 More complete vCard. Support substituting domain as well as userid in filter 7 More complete vCard. Support substituting domain as well as userid in filter
5 8
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;
6use base 'DJabberd::Plugin::VCard'; 6use base 'DJabberd::Plugin::VCard';
7 7
8use Net::LDAP; 8use Net::LDAP;
9use MIME::Base64;
9 10
10our $logger = DJabberd::Log->get_logger(); 11our $logger = DJabberd::Log->get_logger();
11 12
@@ -15,11 +16,11 @@ DJabberd::VCard::LDAP - LDAP VCard Provider for DJabberd
15 16
16=head1 VERSION 17=head1 VERSION
17 18
18Version 0.02 19Version 0.03
19 20
20=cut 21=cut
21 22
22our $VERSION = '0.02'; 23our $VERSION = '0.03';
23 24
24=head1 SYNOPSIS 25=head1 SYNOPSIS
25 26
@@ -120,7 +121,7 @@ sub load_vcard {
120 my $entry = $srch->entry(0); 121 my $entry = $srch->entry(0);
121 my $photo = $entry->get_value('jpegPhoto'); 122 my $photo = $entry->get_value('jpegPhoto');
122 if (defined $photo) { 123 if (defined $photo) {
123 $photo = '<PHOTO><BINVAL>'.$photo.'</BINVAL></PHOTO>'; 124 $photo = '<PHOTO><BINVAL>'.encode_base64($photo).'</BINVAL></PHOTO>';
124 } else { 125 } else {
125 $photo = ''; 126 $photo = '';
126 } 127 }
@@ -155,7 +156,6 @@ sub load_vcard {
155 .$photo 156 .$photo
156 .'<DESC>'._isdef($entry->get_value('description')).'</DESC>' 157 .'<DESC>'._isdef($entry->get_value('description')).'</DESC>'
157 .'</vCard>'; 158 .'</vCard>';
158 $logger->info($vCard);
159 undef($entry); 159 undef($entry);
160 undef($srch); 160 undef($srch);
161 return $vCard; 161 return $vCard;