diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-08-10 08:09:02 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-08-10 08:09:02 +0200 |
commit | 0a96cdd950f30974fe0fecf60b214701673dad86 (patch) | |
tree | e7ee642601cd4fd980ca6bd2a038d742c77b4369 | |
parent | 8ab3a4ebd7fd25fe4b01e92c8d2f4507b0c6ff3d (diff) | |
download | volse-hubzilla-0a96cdd950f30974fe0fecf60b214701673dad86.tar.gz volse-hubzilla-0a96cdd950f30974fe0fecf60b214701673dad86.tar.bz2 volse-hubzilla-0a96cdd950f30974fe0fecf60b214701673dad86.zip |
merge red/master into dev
-rw-r--r-- | Zotlabs/Daemon/Notifier.php | 4 | ||||
-rw-r--r-- | Zotlabs/Lib/PConfig.php | 9 | ||||
-rw-r--r-- | Zotlabs/Lib/ThreadItem.php | 1 | ||||
-rw-r--r-- | Zotlabs/Lib/ThreadStream.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/Ofeed.php | 2 | ||||
-rw-r--r-- | doc/developer/zot_protocol.bb | 10 | ||||
-rw-r--r-- | include/conversation.php | 2 | ||||
-rw-r--r-- | include/network.php | 9 | ||||
-rw-r--r-- | include/photo/photo_driver.php | 4 |
9 files changed, 22 insertions, 20 deletions
diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index f64e6748c..6fae69fcd 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -532,14 +532,14 @@ class Notifier { if($hub['hubloc_network'] == 'zot') { if(! in_array($hub['hubloc_sitekey'],$keys)) { - $hublist[] = $hub['hubloc_host']; + $hublist[] = $hub['hubloc_host'] . ' ' . $hub['hubloc_network']; $dhubs[] = $hub; $keys[] = $hub['hubloc_sitekey']; } } else { if(! in_array($hub['hubloc_url'],$urls)) { - $hublist[] = $hub['hubloc_host']; + $hublist[] = $hub['hubloc_host'] . ' ' . $hub['hubloc_network']; $dhubs[] = $hub; $urls[] = $hub['hubloc_url']; } diff --git a/Zotlabs/Lib/PConfig.php b/Zotlabs/Lib/PConfig.php index 25478e764..2a0b18aac 100644 --- a/Zotlabs/Lib/PConfig.php +++ b/Zotlabs/Lib/PConfig.php @@ -20,11 +20,12 @@ class PConfig { if(is_null($uid) || $uid === false) return false; - if(! array_key_exists($uid, \App::$config)) - \App::$config[$uid] = array(); - if(! is_array(\App::$config)) { - btlogger('App::$config not an array: ' . $uid); + btlogger('App::$config not an array'); + } + + if(! array_key_exists($uid, \App::$config)) { + \App::$config[$uid] = array(); } if(! is_array(\App::$config[$uid])) { diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 3e76890b6..4a66c84bc 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -713,7 +713,6 @@ class ThreadItem { call_hooks('comment_buttons',$arr); $comment_buttons = $arr['comment_buttons']; - $comment_box = replace_macros($template,array( '$return_path' => '', '$threaded' => $this->is_threaded(), diff --git a/Zotlabs/Lib/ThreadStream.php b/Zotlabs/Lib/ThreadStream.php index 1fd746c38..35ccf4fdb 100644 --- a/Zotlabs/Lib/ThreadStream.php +++ b/Zotlabs/Lib/ThreadStream.php @@ -18,6 +18,7 @@ class ThreadStream { private $observer = null; private $writable = false; private $commentable = false; + private $uploadable = false; private $profile_owner = 0; private $preview = false; private $prepared_item = ''; diff --git a/Zotlabs/Module/Ofeed.php b/Zotlabs/Module/Ofeed.php index 2b7acff99..58488d4af 100644 --- a/Zotlabs/Module/Ofeed.php +++ b/Zotlabs/Module/Ofeed.php @@ -18,7 +18,7 @@ class Ofeed extends \Zotlabs\Web\Controller { $params['pages'] = ((x($_REQUEST,'pages')) ? intval($_REQUEST['pages']) : 0); $params['top'] = ((x($_REQUEST,'top')) ? intval($_REQUEST['top']) : 0); $params['start'] = ((x($params,'start')) ? intval($params['start']) : 0); - $params['records'] = ((x($params,'records')) ? intval($params['records']) : 40); + $params['records'] = ((x($params,'records')) ? intval($params['records']) : 10); $params['direction'] = ((x($params,'direction')) ? dbesc($params['direction']) : 'desc'); $params['cat'] = ((x($_REQUEST,'cat')) ? escape_tags($_REQUEST['cat']) : ''); $params['compat'] = ((x($_REQUEST,'compat')) ? intval($_REQUEST['compat']) : 1); diff --git a/doc/developer/zot_protocol.bb b/doc/developer/zot_protocol.bb index b87e1cd73..0d2edfc2b 100644 --- a/doc/developer/zot_protocol.bb +++ b/doc/developer/zot_protocol.bb @@ -79,7 +79,7 @@ We may also attempt to recover with even less information, but doing so is prone In order to implement high performance communications, the data transfer format for all aspects of Zot is JSON. XML communications require way too much overhead. -Bi-directional encryption is based on RSA 4096-bit keys expressed in DER/ASN.1 format using the PKCS#8 encoding variant, with AES-256-CBC used for block encryption of variable length or large items. +Bi-directional encryption is based on RSA 4096-bit keys expressed in DER/ASN.1 format using the PKCS#8 encoding variant, with AES encryption of variable length or large items. The precise encryption algorithms are negotiable between sites. Some aspects of well known "federation protocols" (webfinger, salmon, activitystreams, portablecontacts, etc.) may be used in zot, but we are not tied to them and will not be bound by them. $Projectname project is attempting some rather novel developments in decentralised communications and if there is any need to diverge from such "standard protocols" we will do so without question or hesitation. @@ -391,7 +391,7 @@ When this packet is received, a Zot message is initiated to the auth identity: } [/code] -auth_check messages MUST be encrypted with AES256CBC. This message is sent to the origination site, which checks the 'secret' to see if it is the same as the 'sec' which it passed originally. It also checks the secret_sig which is the secret signed by the destination channel's private key and base64url encoded. If everything checks out, a json packet is returned: +auth_check messages MUST be encrypted. This message is sent to the origination site, which checks the 'secret' to see if it is the same as the 'sec' which it passed originally. It also checks the secret_sig which is the secret signed by the destination channel's private key and base64url encoded. If everything checks out, a json packet is returned: [code nowrap] { "success":1, @@ -404,11 +404,11 @@ auth_check messages MUST be encrypted with AES256CBC. This message is sent to th [h4]Zot Signatures[/h4] All signed data in Zot is accomplished by performing an RSA sign operation using the private key of the initiator. The binary result is then base64url encoded for transport. [h4]Zot Encryption[/h4] -Encryption is currently provided by AES256-CBC, the Advanced Encryption Standard using 256-bit keys and the Cipher Block Chaining mode of operation. Additional algorithms MAY be supported. A 32-octet key and 16-octet initialisation vector are randomly generated. The desired data is then encrypted using these generated strings and the result base64url encoded. Then we build an array: +Encryption is currently provided by AES256CTR. Additional algorithms MAY be supported. A 32-octet key and 16-octet initialisation vector are randomly generated. The desired data is then encrypted using these generated strings and the result base64url encoded. Then we build an array: [dl terms="b"] [*= data]The base64url encoded encrypted data -[*= alg]The chosen algorithm, in this case the string 'aes256cbc'. +[*= alg]The chosen algorithm, in this case the string 'aes256ctr'. [*= key]The randomly generated key, RSA encrypted using the recipients public key, and the result base64url encoded [*= iv]The randomly generated initialization vector, RSA encrypted using the recipient's public key, and the result base64url encoded [/dl] @@ -449,7 +449,7 @@ M23in0xqMVsyQvzjNkpImrO/QdbEFRIIMee83IHq+adbyjQR49Z2hNEIZhkLPc3U "callback":"\/post", "version":"1.2", "encryption":{ - "aes256cbc" + "aes256ctr" }, "secret":"1eaa6613699be6ebb2adcefa5379c61a3678aa0df89025470fac871431b70467", "secret_sig":"0uShifsvhHnxnPIlDM9lWuZ1hSJTrk3NN9Ds6AKpyNRqf3DUdz81-Xvs8I2kj6y5vfFtm-FPKAqu77XP05r74vGaWbqb1r8zpWC7zxXakVVOHHC4plG6rLINjQzvdSFKCQb5R_xtGsPPfvuE24bv4fvN4ZG2ILvb6X4Dly37WW_HXBqBnUs24mngoTxFaPgNmz1nDQNYQu91-ekX4-BNaovjDx4tP379qIG3-NygHTjFoOMDVUvs-pOPi1kfaoMjmYF2mdZAmVYS2nNLWxbeUymkHXF8lT_iVsJSzyaRFJS1Iqn7zbvwH1iUBjD_pB9EmtNmnUraKrCU9eHES27xTwD-yaaH_GHNc1XwXNbhWJaPFAm35U8ki1Le4WbUVRluFx0qwVqlEF3ieGO84PMidrp51FPm83B_oGt80xpvf6P8Ht5WvVpytjMU8UG7-js8hAzWQeYiK05YTXk-78xg0AO6NoNe_RSRk05zYpF6KlA2yQ_My79rZBv9GFt4kUfIxNjd9OiV1wXdidO7Iaq_Q" diff --git a/include/conversation.php b/include/conversation.php index 13ae571d6..f15077e76 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -538,7 +538,7 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa } elseif ($mode === 'photos') { - $profile_onwer = App::$profile['profile_uid']; + $profile_owner = App::$profile['profile_uid']; $page_writeable = ($profile_owner == local_channel()); $live_update_div = '<div id="live-photos"></div>' . "\r\n"; // for photos we've already formatted the top-level item (the photo) diff --git a/include/network.php b/include/network.php index fa49e5765..cd6e980ff 100644 --- a/include/network.php +++ b/include/network.php @@ -671,11 +671,12 @@ function parse_xml_string($s,$strict = true) { libxml_use_internal_errors(true); $x = @simplexml_load_string($s2); - if(! $x) { + if($x === false) { logger('libxml: parse: error: ' . $s2, LOGGER_DATA); - foreach(libxml_get_errors() as $err) - logger('libxml: parse: ' . $err->code." at ".$err->line.":".$err->column." : ".$err->message, LOGGER_DATA); - + foreach(libxml_get_errors() as $err) { + logger('libxml: parse: ' . $err->code . ' at ' . $err->line + . ':' . $err->column . ' : ' . $err->message, LOGGER_DATA); + } libxml_clear_errors(); } diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index f47a9c878..94d0faa94 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -446,7 +446,7 @@ abstract class photo_driver { */ function guess_image_type($filename, $headers = '') { - logger('Photo: guess_image_type: '.$filename . ($headers?' from curl headers':''), LOGGER_DEBUG); +// logger('Photo: guess_image_type: '.$filename . ($headers?' from curl headers':''), LOGGER_DEBUG); $type = null; if ($headers) { @@ -513,7 +513,7 @@ function guess_image_type($filename, $headers = '') { } } - logger('Photo: guess_image_type: type = ' . $type, LOGGER_DEBUG); + logger('Photo: guess_image_type: filename = ' . $filename . ' type = ' . $type, LOGGER_DEBUG); return $type; } |