diff options
author | Max Kostikov <max@kostikov.co> | 2021-02-20 13:39:54 +0000 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2021-02-20 13:39:54 +0000 |
commit | cc5571687971ddcc097abb5e5c57689005d5b070 (patch) | |
tree | 1b2ed0f46b307f09d109350f777438fd04742905 /include/xchan.php | |
parent | e1d622c49f95aec51e5c1bd521dcd6fe2a9a5372 (diff) | |
parent | ddad4f604b56656086b32992ef98709be2568a37 (diff) | |
download | volse-hubzilla-cc5571687971ddcc097abb5e5c57689005d5b070.tar.gz volse-hubzilla-cc5571687971ddcc097abb5e5c57689005d5b070.tar.bz2 volse-hubzilla-cc5571687971ddcc097abb5e5c57689005d5b070.zip |
Merge branch 'dev' into 'dev'
Dev sync
See merge request kostikov/core!1
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', |