$proxy_disabled = ((x($_POST,'proxy_disabled')) ? True : False);
$old_pager = ((x($_POST,'old_pager')) ? True : False);
$only_tag_search = ((x($_POST,'only_tag_search')) ? True : False);
-
+ $rino = ((x($_POST,'rino')) ? intval($_POST['rino']) : 0);
+
+
if($ssl_policy != intval(get_config('system','ssl_policy'))) {
if($ssl_policy == SSL_POLICY_FULL) {
q("update `contact` set
set_config('system','suppress_tags',$suppress_tags);
set_config('system','shortcut_icon',$shortcut_icon);
set_config('system','touch_icon',$touch_icon);
+
if ($banner==""){
// don't know why, but del_config doesn't work...
q("DELETE FROM `config` WHERE `cat` = '%s' AND `k` = '%s' LIMIT 1",
set_config('system','old_pager', $old_pager);
set_config('system','only_tag_search', $only_tag_search);
+ set_config('system','rino_encrypt', $rino);
+
+
info( t('Site settings updated.') . EOL);
goaway($a->get_baseurl(true) . '/admin/site' );
return; // NOTREACHED
'$only_tag_search' => array('only_tag_search', t("Only search in tags"), get_config('system','only_tag_search'), t("On large systems the text search can slow down the system extremely.")),
'$relocate_url' => array('relocate_url', t("New base url"), $a->get_baseurl(), "Change base url for this server. Sends relocate message to all DFRN contacts of all users."),
- '$form_security_token' => get_form_security_token("admin_site")
+
+ '$rino' => array('rino', t("RINO Encription"), intval(get_config('system','rino_encrypt')), t("Encription layer between nodes."), array("Disabled", "RINO1 (deprecated)", "RINO2")),
+
+ '$form_security_token' => get_form_security_token("admin_site")
));
if(strlen($key)) {
+
+ // 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) {
+ logger("rino version '$rino_remote' is lower than supported '$rino'");
+ xml_status(0,"rino version '$rino_remote' is lower than supported '$rino'");
+ }
+
$rawkey = hex2bin(trim($key));
logger('rino: md5 raw key: ' . md5($rawkey));
$final_key = '';
$dfrn_id = notags(trim($_GET['dfrn_id']));
$dfrn_version = (float) $_GET['dfrn_version'];
+ $rino_remote = ((x($_GET,'rino')) ? intval($_GET['rino']) : 0);
$type = "";
$last_update = "";
$rino = get_config('system','rino_encrypt');
-
- if(! $rino){
- $rino = 0;
- } else {
- $rino = 2;
- }
+ $rino = intval($rino);
+
+ // if requested rino is lower than enabled local rino, lower local rino version
+ // if requested rino is higher than enabled local rino, reply with local rino
+ if ($rino_remote < $rino) $rino = $rino_remote;
if((($r[0]['rel']) && ($r[0]['rel'] != CONTACT_IS_SHARING)) || ($r[0]['page-flags'] == PAGE_COMMUNITY)) {
$perm = 'rw';