aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-09-12 16:52:58 -0700
committerfriendica <info@friendica.com>2013-09-12 16:52:58 -0700
commit037fd43fbde829cf4911d7500043f3befa5e99b2 (patch)
treef7676a3ec68fa18939017554111668596b6d99d2 /mod
parent816d764aecbd6105c41d591e2d7c0160758f1779 (diff)
downloadvolse-hubzilla-037fd43fbde829cf4911d7500043f3befa5e99b2.tar.gz
volse-hubzilla-037fd43fbde829cf4911d7500043f3befa5e99b2.tar.bz2
volse-hubzilla-037fd43fbde829cf4911d7500043f3befa5e99b2.zip
more remote error reporting for zot
Diffstat (limited to 'mod')
-rw-r--r--mod/post.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/mod/post.php b/mod/post.php
index c4254b10a..378192cbf 100644
--- a/mod/post.php
+++ b/mod/post.php
@@ -174,7 +174,18 @@ function post_post(&$a) {
if(array_key_exists('iv',$data)) {
$data = aes_unencapsulate($data,get_config('system','prvkey'));
logger('mod_zot: decrypt1: ' . $data, LOGGER_DATA);
+ if(! $data) {
+ $ret['message'] = 'Decryption failed.';
+ json_return_and_die($ret);
+ }
+
$data = json_decode($data,true);
+
+ }
+
+ if(! $data) {
+ $ret['message'] = 'No data received.';
+ json_return_and_die($ret);
}
logger('mod_zot: decoded data: ' . print_r($data,true), LOGGER_DATA);