diff options
author | Mario <mario@mariovavti.com> | 2024-01-13 20:38:34 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-01-13 20:38:34 +0000 |
commit | fa7aa6cedb83279252d1e26bb58227a6f99df9ed (patch) | |
tree | 5db025c66abd519d20cc6afdb35b32e72f09a0ce /Zotlabs/Lib/JcsEddsa2022.php | |
parent | 6df98f2fad7741af341f4e74fd2e2f28f21bf373 (diff) | |
download | volse-hubzilla-fa7aa6cedb83279252d1e26bb58227a6f99df9ed.tar.gz volse-hubzilla-fa7aa6cedb83279252d1e26bb58227a6f99df9ed.tar.bz2 volse-hubzilla-fa7aa6cedb83279252d1e26bb58227a6f99df9ed.zip |
start checking integrity proofs, remove signature prior to verify, iterate trough the array to find the desired ekey in actor_store()
Diffstat (limited to 'Zotlabs/Lib/JcsEddsa2022.php')
-rw-r--r-- | Zotlabs/Lib/JcsEddsa2022.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Zotlabs/Lib/JcsEddsa2022.php b/Zotlabs/Lib/JcsEddsa2022.php index 425627b62..14f16c94b 100644 --- a/Zotlabs/Lib/JcsEddsa2022.php +++ b/Zotlabs/Lib/JcsEddsa2022.php @@ -37,6 +37,7 @@ class JcsEddsa2022 { if (!str_starts_with($encodedSignature,'z')) { return false; } + $encodedSignature = substr($encodedSignature, 1); $optionsHash = $this->hash($this->signableOptions($data['proof']), true); $dataHash = $this->hash($this->signableData($data),true); @@ -58,7 +59,7 @@ class JcsEddsa2022 { $signableData = []; if ($data) { foreach ($data as $k => $v) { - if ($k != 'proof') { + if (!in_array($k, ['proof', 'signature'])) { $signableData[$k] = $v; } } |