From abd58bce6899aff274be2e24db08cca46c4b135b Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 26 Mar 2013 19:37:33 -0700 Subject: set hidden flags on new directory entries, not just existing ones --- mod/post.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/mod/post.php b/mod/post.php index e5c68d4bd..5b002eb36 100644 --- a/mod/post.php +++ b/mod/post.php @@ -10,9 +10,9 @@ require_once('include/zot.php'); function post_init(&$a) { - // All other access to this endpoint is via the post method. + // Most access to this endpoint is via the post method. // Here we will pick out the magic auth params which arrive - // as a get request. + // as a get request, and the only communications to arrive this way. if(argc() > 1) { @@ -150,6 +150,11 @@ function post_post(&$a) { logger('mod_zot: data: ' . print_r($data,true), LOGGER_DATA); + /** + * Many message packets will arrive encrypted. The existence of an 'iv' element + * tells us we need to unencapsulate the AES-256-CBC content using the site private key + */ + if(array_key_exists('iv',$data)) { $data = aes_unencapsulate($data,get_config('system','prvkey')); logger('mod_zot: decrypt1: ' . $data, LOGGER_DATA); -- cgit v1.2.3