aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-01-13 20:38:34 +0000
committerMario <mario@mariovavti.com>2024-01-13 20:38:34 +0000
commitfa7aa6cedb83279252d1e26bb58227a6f99df9ed (patch)
tree5db025c66abd519d20cc6afdb35b32e72f09a0ce /Zotlabs/Lib/Activity.php
parent6df98f2fad7741af341f4e74fd2e2f28f21bf373 (diff)
downloadvolse-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/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 93f50fc56..6c680c56e 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -1757,14 +1757,12 @@ class Activity {
}
$epubkey = '';
- // TODO: We should probably also deal with arrays here.
- // It is not clear yet which key we want to store if we got more than one though.
- if (isset($person_obj['assertionMethod']['publicKeyMultibase'])) {
- if ($person_obj['id'] === $person_obj['assertionMethod']['controller']) {
+ foreach($person_obj['assertionMethod'] as $am) {
+ if ($person_obj['id'] === $am['controller'] &&
+ $am['type'] === 'Multikey' &&
+ str_starts_with($am['publicKeyMultibase'], 'z6Mk')
+ ) {
$epubkey = $person_obj['assertionMethod']['publicKeyMultibase'];
- if ($person_obj['assertionMethod']['type'] === 'Multikey') {
- $epubkey = $person_obj['assertionMethod']['publicKeyMultibase'];
- }
}
}