more remote error reporting for zot
This commit is contained in:
parent
816d764aec
commit
037fd43fbd
1
boot.php
1
boot.php
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/** @file */
|
/** @file */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Red Matrix.
|
* Red Matrix.
|
||||||
*
|
*
|
||||||
|
11
mod/post.php
11
mod/post.php
@ -174,7 +174,18 @@ function post_post(&$a) {
|
|||||||
if(array_key_exists('iv',$data)) {
|
if(array_key_exists('iv',$data)) {
|
||||||
$data = aes_unencapsulate($data,get_config('system','prvkey'));
|
$data = aes_unencapsulate($data,get_config('system','prvkey'));
|
||||||
logger('mod_zot: decrypt1: ' . $data, LOGGER_DATA);
|
logger('mod_zot: decrypt1: ' . $data, LOGGER_DATA);
|
||||||
|
if(! $data) {
|
||||||
|
$ret['message'] = 'Decryption failed.';
|
||||||
|
json_return_and_die($ret);
|
||||||
|
}
|
||||||
|
|
||||||
$data = json_decode($data,true);
|
$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);
|
logger('mod_zot: decoded data: ' . print_r($data,true), LOGGER_DATA);
|
||||||
|
Reference in New Issue
Block a user