This commit is contained in:
Mario Vavti 2016-02-26 09:21:01 +01:00
commit 0653a2e0a9
4 changed files with 22 additions and 6 deletions

View File

@ -41,9 +41,10 @@ class Receiver {
if(! $this->messagetype) if(! $this->messagetype)
$this->error = true; $this->error = true;
$this->sender = ((array_key_exists('sender',$this->data)) ? $this->data['sender'] : null); if($this->data) {
$this->recipients = ((array_key_exists('recipients',$this->data)) ? $this->data['recipients'] : null); $this->sender = ((array_key_exists('sender',$this->data)) ? $this->data['sender'] : null);
$this->recipients = ((array_key_exists('recipients',$this->data)) ? $this->data['recipients'] : null);
}
if($this->sender) if($this->sender)
$this->ValidateSender(); $this->ValidateSender();

View File

@ -21,6 +21,21 @@ function rsa_verify($data,$sig,$key,$alg = 'sha256') {
if(intval(OPENSSL_ALGO_SHA256) && $alg === 'sha256') if(intval(OPENSSL_ALGO_SHA256) && $alg === 'sha256')
$alg = OPENSSL_ALGO_SHA256; $alg = OPENSSL_ALGO_SHA256;
$verify = openssl_verify($data,$sig,$key,$alg); $verify = openssl_verify($data,$sig,$key,$alg);
if(! $verify) {
logger('openssl_verify: ' . openssl_error_string(),LOGGER_NORMAL,LOG_ERR);
logger('openssl_verify: key: ' . $key, LOGGER_DEBUG, LOG_ERR);
// provide a backtrace so that we can debug key issues
if(version_compare(PHP_VERSION, '5.4.0') >= 0) {
$stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
if($stack) {
foreach($stack as $s) {
logger('stack: ' . basename($s['file']) . ':' . $s['line'] . ':' . $s['function'] . '()',LOGGER_DEBUG,LOG_ERR);
}
}
}
}
return $verify; return $verify;
} }

View File

@ -549,7 +549,7 @@ function update_birthdays() {
$ev['event_xchan'] = $rr['xchan_hash']; $ev['event_xchan'] = $rr['xchan_hash'];
$ev['start'] = datetime_convert('UTC', 'UTC', $rr['abook_dob']); $ev['start'] = datetime_convert('UTC', 'UTC', $rr['abook_dob']);
$ev['finish'] = datetime_convert('UTC', 'UTC', $rr['abook_dob'] . ' + 1 day '); $ev['finish'] = datetime_convert('UTC', 'UTC', $rr['abook_dob'] . ' + 1 day ');
$ev['adjust'] = 0; $ev['adjust'] = 1;
$ev['summary'] = sprintf( t('%1$s\'s birthday'), $rr['xchan_name']); $ev['summary'] = sprintf( t('%1$s\'s birthday'), $rr['xchan_name']);
$ev['description'] = sprintf( t('Happy Birthday %1$s'), $ev['description'] = sprintf( t('Happy Birthday %1$s'),
'[zrl=' . $rr['xchan_url'] . ']' . $rr['xchan_name'] . '[/zrl]') ; '[zrl=' . $rr['xchan_url'] . ']' . $rr['xchan_name'] . '[/zrl]') ;

View File

@ -126,7 +126,7 @@ function queue_deliver($outq, $immediate = false) {
remove_queue_item($outq['outq_hash']); remove_queue_item($outq['outq_hash']);
// server is responding - see if anything else is going to this destination and is piled up // server is responding - see if anything else is going to this destination and is piled up
// and try to send some more. We're relying on the fact that delivery_loop() results in an // and try to send some more. We're relying on the fact that do_delivery() results in an
// immediate delivery otherwise we could get into a queue loop. // immediate delivery otherwise we could get into a queue loop.
if(! $immediate) { if(! $immediate) {
@ -141,7 +141,7 @@ function queue_deliver($outq, $immediate = false) {
} }
} }
if($piled_up) { if($piled_up) {
delivery_loop($piled_up); do_delivery($piled_up);
} }
} }
} }