diff options
author | zotlabs <mike@macgirvin.com> | 2017-09-24 00:28:31 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-09-24 00:28:31 -0700 |
commit | 0e76cec28ff734fdec4ba00d9787beb31ffd2cbb (patch) | |
tree | 3402362ae13925c0bca8073f8eb30a468818fa3c /Zotlabs | |
parent | b772a5f564d44fd41a2bf823097b5af5c04339fa (diff) | |
parent | 2988e33b57b8b971da86ce6e945f8c65f4ebb6b1 (diff) | |
download | volse-hubzilla-0e76cec28ff734fdec4ba00d9787beb31ffd2cbb.tar.gz volse-hubzilla-0e76cec28ff734fdec4ba00d9787beb31ffd2cbb.tar.bz2 volse-hubzilla-0e76cec28ff734fdec4ba00d9787beb31ffd2cbb.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Daemon/Deliver.php | 34 | ||||
-rw-r--r-- | Zotlabs/Module/Admin/Site.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Pubsites.php | 3 | ||||
-rw-r--r-- | Zotlabs/Web/HTTPSig.php | 4 |
4 files changed, 21 insertions, 22 deletions
diff --git a/Zotlabs/Daemon/Deliver.php b/Zotlabs/Daemon/Deliver.php index 7c1ff717f..394a7bf3e 100644 --- a/Zotlabs/Daemon/Deliver.php +++ b/Zotlabs/Daemon/Deliver.php @@ -53,29 +53,25 @@ class Deliver { remove_queue_item($r[0]['outq_hash']); if($dresult && is_array($dresult)) { - if(array_key_exists('iv',$dresult)) { - $dresult = json_decode(crypto_unencapsulate($dresult,get_config('system','prvkey')),true); - } - if(! $dresult) { - logger('dreport decryption failure'); - } - else { - foreach($dresult as $xx) { - if(is_array($xx) && array_key_exists('message_id',$xx)) { - if(delivery_report_is_storable($xx)) { - q("insert into dreport ( dreport_mid, dreport_site, dreport_recip, dreport_result, dreport_time, dreport_xchan ) values ( '%s', '%s','%s','%s','%s','%s' ) ", - dbesc($xx['message_id']), - dbesc($xx['location']), - dbesc($xx['recipient']), - dbesc($xx['status']), - dbesc(datetime_convert($xx['date'])), - dbesc($xx['sender']) - ); - } + + // delivery reports for local deliveries do not require encryption + + foreach($dresult as $xx) { + if(is_array($xx) && array_key_exists('message_id',$xx)) { + if(delivery_report_is_storable($xx)) { + q("insert into dreport ( dreport_mid, dreport_site, dreport_recip, dreport_result, dreport_time, dreport_xchan ) values ( '%s', '%s','%s','%s','%s','%s' ) ", + dbesc($xx['message_id']), + dbesc($xx['location']), + dbesc($xx['recipient']), + dbesc($xx['status']), + dbesc(datetime_convert($xx['date'])), + dbesc($xx['sender']) + ); } } } } + q("delete from dreport where dreport_queue = '%s'", dbesc($argv[$x]) ); diff --git a/Zotlabs/Module/Admin/Site.php b/Zotlabs/Module/Admin/Site.php index 4c5b82e78..4946e3433 100644 --- a/Zotlabs/Module/Admin/Site.php +++ b/Zotlabs/Module/Admin/Site.php @@ -206,7 +206,7 @@ class Site { // directory server should not be set or settable unless we are a directory client if($dirmode == DIRECTORY_MODE_NORMAL) { - $x = q("select site_url from site where site_flags in (%d,%d) and site_realm = '%s'", + $x = q("select site_url from site where site_flags in (%d,%d) and site_realm = '%s' and site_dead = 0", intval(DIRECTORY_MODE_SECONDARY), intval(DIRECTORY_MODE_PRIMARY), dbesc($realm) diff --git a/Zotlabs/Module/Pubsites.php b/Zotlabs/Module/Pubsites.php index d87967189..ef02cf099 100644 --- a/Zotlabs/Module/Pubsites.php +++ b/Zotlabs/Module/Pubsites.php @@ -36,7 +36,8 @@ class Pubsites extends \Zotlabs\Web\Controller { $o .= '</tr>'; if($j['sites']) { foreach($j['sites'] as $jj) { - if(! \Zotlabs\Lib\System::compatible_project($jj['project'])) + $projectname = explode(' ',$jj['project']); + if(! \Zotlabs\Lib\System::compatible_project($projectname[0])) continue; if(strpos($jj['version'],' ')) { $x = explode(' ', $jj['version']); diff --git a/Zotlabs/Web/HTTPSig.php b/Zotlabs/Web/HTTPSig.php index 986e10d73..8062764fb 100644 --- a/Zotlabs/Web/HTTPSig.php +++ b/Zotlabs/Web/HTTPSig.php @@ -67,8 +67,10 @@ class HTTPSig { $sig_block = self::parse_sigheader($headers['authorization']); } - if(! $sig_block) + if(! $sig_block) { + logger('no signature provided.'); return $result; + } logger('sig_block: ' . print_r($sig_block,true), LOGGER_DATA); |