aboutsummaryrefslogtreecommitdiffstats
path: root/include/diaspora.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2011-12-19 16:51:57 -0800
committerfriendica <info@friendica.com>2011-12-19 16:51:57 -0800
commit79f3bbbf2b0e41db2653f9d0fd4eb7520ba58a25 (patch)
tree10179ac62891cf7df0d8dafb9bbf0aec9245c74c /include/diaspora.php
parent7c6bc5a93d50de8e15d6158aa3dae7936097dbec (diff)
downloadvolse-hubzilla-79f3bbbf2b0e41db2653f9d0fd4eb7520ba58a25.tar.gz
volse-hubzilla-79f3bbbf2b0e41db2653f9d0fd4eb7520ba58a25.tar.bz2
volse-hubzilla-79f3bbbf2b0e41db2653f9d0fd4eb7520ba58a25.zip
more data checking, cleans up some infrequent php errors
Diffstat (limited to 'include/diaspora.php')
-rw-r--r--include/diaspora.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 7f1e4a8e3..3ab454246 100644
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -188,6 +188,13 @@ function diaspora_msg_build($msg,$user,$contact,$prvkey,$pubkey,$public = false)
logger('diaspora_msg_build: ' . $msg, LOGGER_DATA);
+ // without a public key nothing will work
+
+ if(! $pubkey) {
+ logger('diaspora_msg_build: pubkey missing: contact id: ' . $contact['id']);
+ return '';
+ }
+
$inner_aes_key = random_string(32);
$b_inner_aes_key = base64_encode($inner_aes_key);
$inner_iv = random_string(16);