1
0
Fork 0

more data checking, cleans up some infrequent php errors

This commit is contained in:
friendica 2011-12-19 16:51:57 -08:00
commit 79f3bbbf2b
2 changed files with 10 additions and 0 deletions

View file

@ -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);