Merge remote-tracking branch 'upstream/develop' into item-permissions
This commit is contained in:
commit
b5b298c8d6
21 changed files with 177 additions and 243 deletions
|
@ -1336,7 +1336,7 @@ function admin_page_site(App $a)
|
|||
|
||||
'$relocate_url' => ['relocate_url', t("New base url"), System::baseUrl(), t("Change base url for this server. Sends relocate message to all Friendica and Diaspora* contacts of all users.")],
|
||||
|
||||
'$rino' => ['rino', t("RINO Encryption"), intval(Config::get('system','rino_encrypt')), t("Encryption layer between nodes."), ["Disabled", "RINO1 (deprecated)", "RINO2"]],
|
||||
'$rino' => ['rino', t("RINO Encryption"), intval(Config::get('system','rino_encrypt')), t("Encryption layer between nodes."), [0 => "Disabled", 1 => "Enabled"]],
|
||||
|
||||
'$worker_queues' => ['worker_queues', t("Maximum number of parallel workers"), Config::get('system','worker_queues'), t("On shared hosters set this to 2. On larger systems, values of 10 are great. Default value is 4.")],
|
||||
'$worker_dont_fork' => ['worker_dont_fork', t("Don't use 'proc_open' with the worker"), Config::get('system','worker_dont_fork'), t("Enable this if your system doesn't allow the use of 'proc_open'. This can happen on shared hosters. If this is enabled you should increase the frequency of worker calls in your crontab.")],
|
||||
|
|
|
@ -143,7 +143,7 @@ function dfrn_notify_post(App $a) {
|
|||
|
||||
// if local rino is lower than remote rino, abort: should not happen!
|
||||
// but only for $remote_rino > 1, because old code did't send rino version
|
||||
if ($rino_remote_version > 1 && $rino < $rino_remote) {
|
||||
if ($rino_remote > 1 && $rino < $rino_remote) {
|
||||
logger("rino version '$rino_remote' is lower than supported '$rino'");
|
||||
xml_status(0, "rino version '$rino_remote' is lower than supported '$rino'");
|
||||
}
|
||||
|
@ -166,44 +166,18 @@ function dfrn_notify_post(App $a) {
|
|||
}
|
||||
}
|
||||
|
||||
#logger('rino: received key : ' . $final_key);
|
||||
|
||||
switch($rino_remote) {
|
||||
case 0:
|
||||
case 1:
|
||||
/*
|
||||
*we got a key. old code send only the key, without RINO version.
|
||||
* we assume RINO 1 if key and no RINO version
|
||||
*/
|
||||
// we got a key. old code send only the key, without RINO version.
|
||||
// we assume RINO 1 if key and no RINO version
|
||||
$data = DFRN::aesDecrypt(hex2bin($data), $final_key);
|
||||
break;
|
||||
case 2:
|
||||
try {
|
||||
$data = \Crypto::decrypt(hex2bin($data), $final_key);
|
||||
} catch (\InvalidCiphertextException $ex) { // VERY IMPORTANT
|
||||
/*
|
||||
* Either:
|
||||
* 1. The ciphertext was modified by the attacker,
|
||||
* 2. The key is wrong, or
|
||||
* 3. $ciphertext is not a valid ciphertext or was corrupted.
|
||||
* Assume the worst.
|
||||
*/
|
||||
logger('The ciphertext has been tampered with!');
|
||||
xml_status(0, 'The ciphertext has been tampered with!');
|
||||
} catch (\CryptoTestFailedException $ex) {
|
||||
logger('Cannot safely perform dencryption');
|
||||
xml_status(0, 'CryptoTestFailed');
|
||||
} catch (\CannotPerformOperationException $ex) {
|
||||
logger('Cannot safely perform decryption');
|
||||
xml_status(0, 'Cannot safely perform decryption');
|
||||
}
|
||||
break;
|
||||
default:
|
||||
logger("rino: invalid sent version '$rino_remote'");
|
||||
xml_status(0, "Invalid sent version '$rino_remote'");
|
||||
}
|
||||
|
||||
|
||||
logger('rino: decrypted data: ' . $data, LOGGER_DATA);
|
||||
}
|
||||
|
||||
|
|
|
@ -638,8 +638,8 @@ function dfrn_request_content(App $a)
|
|||
$page_desc = t("Please enter your 'Identity Address' from one of the following supported communications networks:");
|
||||
|
||||
$invite_desc = sprintf(
|
||||
t('If you are not yet a member of the free social web, <a href="%s/siteinfo">follow this link to find a public Friendica site and join us today</a>.'),
|
||||
get_server()
|
||||
t('If you are not yet a member of the free social web, <a href="%s">follow this link to find a public Friendica site and join us today</a>.'),
|
||||
get_server() . '/servers'
|
||||
);
|
||||
|
||||
$o = replace_macros($tpl, [
|
||||
|
|
|
@ -63,7 +63,7 @@ function install_post(App $a) {
|
|||
$timezone = notags(trim($_POST['timezone']));
|
||||
$language = notags(trim($_POST['language']));
|
||||
$adminmail = notags(trim($_POST['adminmail']));
|
||||
$rino = 2;
|
||||
$rino = 1;
|
||||
|
||||
// connect to db
|
||||
dba::connect($dbhost, $dbuser, $dbpass, $dbdata, true);
|
||||
|
|
|
@ -135,6 +135,7 @@ function search_content(App $a) {
|
|||
|
||||
Nav::setSelected('search');
|
||||
|
||||
$search = '';
|
||||
if (x($a->data,'search'))
|
||||
$search = notags(trim($a->data['search']));
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue