diff options
author | Christian Vogeley <christian.vogeley@hotmail.de> | 2013-09-15 03:21:19 +0200 |
---|---|---|
committer | Christian Vogeley <christian.vogeley@hotmail.de> | 2013-09-15 03:21:19 +0200 |
commit | 4132d1cd8e59d2cf84d7578ac700c65d7954edd6 (patch) | |
tree | 5586bb1bf97ad9e457de2eacb298d28e22c854ee /mod/post.php | |
parent | 496f869157ab76139d14a3c67fd8276ee6557517 (diff) | |
parent | aefb0f823353d15a281d3c94ec6fc044e1b62580 (diff) | |
download | volse-hubzilla-4132d1cd8e59d2cf84d7578ac700c65d7954edd6.tar.gz volse-hubzilla-4132d1cd8e59d2cf84d7578ac700c65d7954edd6.tar.bz2 volse-hubzilla-4132d1cd8e59d2cf84d7578ac700c65d7954edd6.zip |
Upstream merge
Diffstat (limited to 'mod/post.php')
-rw-r--r-- | mod/post.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mod/post.php b/mod/post.php index 70dd4dc19..378192cbf 100644 --- a/mod/post.php +++ b/mod/post.php @@ -127,6 +127,12 @@ function post_init(&$a) { info(sprintf( t('Welcome %s. Remote authentication successful.'),$x[0]['xchan_name'])); logger('mod_zot: auth success from ' . $x[0]['xchan_addr'] . ' for ' . $webbie); + } else { + logger('mod_zot: still not authenticated: ' . $x[0]['xchan_addr']); + q("update hubloc set hubloc_status = (hubloc_status | %d ) where hubloc_addr = '%s'", + intval(HUBLOC_RECEIVE_ERROR), + $x[0][xchan_addr] + ); } // FIXME - we really want to save the return_url in the session before we visit rmagic. @@ -168,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); |