]> git.mxchange.org Git - friendica.git/commitdiff
Merge branch 'develop' into rewrites/coding-convention-split2
authorRoland Häder <Quix0r@users.noreply.github.com>
Sat, 1 Apr 2017 20:16:08 +0000 (22:16 +0200)
committerGitHub <noreply@github.com>
Sat, 1 Apr 2017 20:16:08 +0000 (22:16 +0200)
1  2 
boot.php
include/dfrn.php
include/ostatus.php
mod/admin.php
mod/dfrn_confirm.php
mod/dfrn_notify.php
mod/install.php

diff --cc boot.php
Simple merge
index 83d76a0ae45cea961b58cd1ea60944fac1f10a0c,4002bb4268de07a2dca041789dfac033ff557666..aae935963d0427c7b6ab7afd3cefc62ecc73893a
@@@ -948,21 -904,15 +972,16 @@@ class dfrn 
  
                $idtosend = $orig_id = (($contact['dfrn-id']) ? $contact['dfrn-id'] : $contact['issued-id']);
  
 -              if($contact['duplex'] && $contact['dfrn-id'])
 +              if ($contact['duplex'] && $contact['dfrn-id']) {
                        $idtosend = '0:' . $orig_id;
 -              if($contact['duplex'] && $contact['issued-id'])
 +              }
 +              if ($contact['duplex'] && $contact['issued-id']) {
                        $idtosend = '1:' . $orig_id;
 +              }
  
 -
 -              $rino = get_config('system','rino_encrypt');
 +              $rino = get_config('system', 'rino_encrypt');
                $rino = intval($rino);
  
-               // use RINO1 if mcrypt isn't installed and RINO2 was selected
-               if ($rino == 2 and !function_exists('mcrypt_create_iv')) {
-                       $rino = 1;
-               }
                logger("Local rino version: ". $rino, LOGGER_DEBUG);
  
                $ssl_val = intval(get_config('system','ssl_policy'));
  
                $postvars['ssl_policy'] = $ssl_policy;
  
 -              if($page)
 +              if ($page) {
                        $postvars['page'] = $page;
 +              }
  
  
 -              if($rino>0 && $rino_remote_version>0 && (! $dissolve)) {
 +              if ($rino > 0 && $rino_remote_version > 0 && (! $dissolve)) {
                        logger('rino version: '. $rino_remote_version);
  
 -                      switch($rino_remote_version) {
 +                      switch ($rino_remote_version) {
                                case 1:
                                        // Deprecated rino version!
-                                       $key = substr(random_string(), 0, 16);
-                                       $data = aes_encrypt($postvars['data'],$key);
+                                       $key = openssl_random_pseudo_bytes(16);
+                                       $data = self::aes_encrypt($postvars['data'], $key);
                                        break;
                                case 2:
                                        // RINO 2 based on php-encryption
Simple merge
diff --cc mod/admin.php
Simple merge
Simple merge
index ddbc9219b1d209d14b609a9feb8d38b2b1702c19,8df462e58fd181d01d9711726dc3594617b89788..b42ef9b70a82cee1bc669945d2bd8c3c9fba0a27
@@@ -136,16 -133,19 +136,12 @@@ function dfrn_notify_post(App $a) 
  
        }
  
 -
 -      // If we are setup as a soapbox we aren't accepting input from this person
 -      // This behaviour is deactivated since it really doesn't make sense to even disallow comments
 -      // The check if someone is a friend or simply a follower is done in a later place so it needn't to be done here
 -      //if($importer['page-flags'] == PAGE_SOAPBOX)
 -      //      xml_status(0);
 -
 -      $rino = get_config('system','rino_encrypt');
 +      $rino = get_config('system', 'rino_encrypt');
        $rino = intval($rino);
-       // use RINO1 if mcrypt isn't installed and RINO2 was selected
-       if ($rino == 2 && !function_exists('mcrypt_create_iv')) {
-               $rino = 1;
-       }
  
 -      logger("Local rino version: ". $rino, LOGGER_DEBUG);
 +      logger("Local rino version: " .  $rino, LOGGER_DEBUG);
  
 -      if(strlen($key)) {
 +      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
                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
 -                              $data = dfrn::aes_decrypt(hex2bin($data),$final_key);
 +                              /*
-                                * we got a key. old code send only the key, without 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 = aes_decrypt(hex2bin($data), $final_key);
++                              $data = dfrn::aes_decrypt(hex2bin($data), $final_key);
                                break;
                        case 2:
                                try {
@@@ -314,12 -311,8 +310,8 @@@ function dfrn_notify_content(App $a) 
                $encrypted_id = bin2hex($encrypted_id);
  
  
 -              $rino = get_config('system','rino_encrypt');
 +              $rino = get_config('system', 'rino_encrypt');
                $rino = intval($rino);
-               // use RINO1 if mcrypt isn't installed and RINO2 was selected
-               if ($rino == 2 && !function_exists('mcrypt_create_iv')) {
-                       $rino = 1;
-               }
  
                logger("Local rino version: ". $rino, LOGGER_DEBUG);
  
diff --cc mod/install.php
Simple merge