summaryrefslogtreecommitdiff
path: root/program/steps/addressbook/photo.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-08-01 12:49:37 +0200
committerAleksander Machniak <alec@alec.pl>2014-08-01 12:52:33 +0200
commit1fac787d2cedc2ada103418bf91895b3edf1dd8f (patch)
treefa809234923c7ceb849bc7348b3bb31a8224dbbc /program/steps/addressbook/photo.inc
parentd1749659d25c5b68600aef3557284cedff8dded1 (diff)
Fix various iCloud vCard issues, added fallback for external photos (#1489993)
Conflicts: program/steps/addressbook/func.inc
Diffstat (limited to 'program/steps/addressbook/photo.inc')
-rw-r--r--program/steps/addressbook/photo.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/program/steps/addressbook/photo.inc b/program/steps/addressbook/photo.inc
index 482185735..30d09ffcc 100644
--- a/program/steps/addressbook/photo.inc
+++ b/program/steps/addressbook/photo.inc
@@ -72,8 +72,12 @@ $plugin = $RCMAIL->plugins->exec_hook('contact_photo',
if ($plugin['url']) {
$RCMAIL->output->redirect($plugin['url']);
}
-else {
- $data = $plugin['data'];
+
+$data = $plugin['data'];
+
+// detect if photo data is an URL
+if (strlen($data) < 1024 && filter_var($data, FILTER_VALIDATE_URL)) {
+ $RCMAIL->output->redirect($data);
}
// deliver alt image