diff options
author | Hilmar R <u02@u29lx193> | 2021-02-28 21:06:16 +0100 |
---|---|---|
committer | Hilmar R <u02@u29lx193> | 2021-03-01 18:48:11 +0100 |
commit | c26dede97f626b52b7bf8962ed55d1dbda86abe8 (patch) | |
tree | 3c8c9bc97aa09f7ce9afe9bf467cf87bbf2c7d0b /include/xchan.php | |
parent | ea3390d626f85b7293a750958bfd1b5460958365 (diff) | |
download | volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.tar.gz volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.tar.bz2 volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.zip |
get dev
Diffstat (limited to 'include/xchan.php')
-rw-r--r-- | include/xchan.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/xchan.php b/include/xchan.php index 5de828e7f..07fdb8b47 100644 --- a/include/xchan.php +++ b/include/xchan.php @@ -1,5 +1,6 @@ <?php +use Zotlabs\Lib\Crypto; use Zotlabs\Web\HTTPSig; use Zotlabs\Lib\Libzot; @@ -85,7 +86,7 @@ function xchan_store($arr) { } if($arr['network'] === 'zot') { - if((! $arr['key']) || (! rsa_verify($arr['guid'],base64url_decode($arr['guid_sig']),$arr['key']))) { + if((! $arr['key']) || (! Crypto::verify($arr['guid'],base64url_decode($arr['guid_sig']),$arr['key']))) { logger('Unable to verify signature for ' . $arr['hash']); return false; } @@ -102,7 +103,7 @@ function xchan_store($arr) { if($k === 'photo') { continue; } - + if(in_array($columns,'xchan_' . $k)) $x['xchan_' . $k] = escape_tags($v); } @@ -112,7 +113,7 @@ function xchan_store($arr) { $x['xchan_system'] = false; $result = xchan_store_lowlevel($x); - + if(! $result) return $result; } @@ -207,9 +208,9 @@ function xchan_keychange_acl($table,$column,$oldxchan,$newxchan) { if($r) { foreach($r as $rv) { $z = q("update $table set $allow = '%s', $deny = '%s' where $column = %d", - dbesc(str_replace('<' . $oldxchan['xchan_hash'] . '>', '<' . $newxchan['xchan_hash'] . '>', + dbesc(str_replace('<' . $oldxchan['xchan_hash'] . '>', '<' . $newxchan['xchan_hash'] . '>', $rv[$allow])), - dbesc(str_replace('<' . $oldxchan['xchan_hash'] . '>', '<' . $newxchan['xchan_hash'] . '>', + dbesc(str_replace('<' . $oldxchan['xchan_hash'] . '>', '<' . $newxchan['xchan_hash'] . '>', $rv[$deny])), intval($rv[$column]) ); @@ -243,7 +244,7 @@ function xchan_change_key($oldx,$newx,$data) { 'xprof' => 'xprof_hash', 'xtag' => 'xtag_hash' ]; - + $acls = [ 'channel' => 'channel_id', |