diff --git a/boot.php b/boot.php index 0cde9419d..9c0fb8919 100755 --- a/boot.php +++ b/boot.php @@ -1392,7 +1392,14 @@ function fix_system_urls($oldurl,$newurl) { dbesc($rr['xchan_hash']), dbesc($oldurl) ); - + + + $z = q("update profile set photo = '%s', thumb = '%s' where uid = %d", + dbesc(str_replace($oldurl,$newurl,$rr['xchan_photo_l'])), + dbesc(str_replace($oldurl,$newurl,$rr['xchan_photo_m'])), + intval($rr['channel_id']) + ); + proc_run('php', 'include/notifier.php', 'refresh_all', $rr['channel_id']); } diff --git a/include/crypto.php b/include/crypto.php index e9372fbb4..339d5fe17 100644 --- a/include/crypto.php +++ b/include/crypto.php @@ -4,6 +4,8 @@ function rsa_sign($data,$key,$alg = 'sha256') { if(! $key) return 'no key'; $sig = ''; + if(defined(OPENSSL_ALGO_SHA256) && $alg === 'sha256') + $alg = OPENSSL_ALGO_SHA256; openssl_sign($data,$sig,$key,$alg); return $sig; } @@ -13,6 +15,8 @@ function rsa_verify($data,$sig,$key,$alg = 'sha256') { if(! $key) return false; + if(defined(OPENSSL_ALGO_SHA256) && $alg === 'sha256') + $alg = OPENSSL_ALGO_SHA256; $verify = openssl_verify($data,$sig,$key,$alg); return $verify; }