From 97b9634a9e115e18f5e895e7d5ba52b70c2acb99 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sat, 15 Jul 2023 18:07:07 -0400 Subject: [PATCH] practically, sufficient for keys to be owned by same domain as actor. the url scheme doesn't matter, and need not match. problem identified by eta. --- fun.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/fun.go b/fun.go index 4fa9a1c..3caa320 100644 --- a/fun.go +++ b/fun.go @@ -694,13 +694,9 @@ func savingthrow(keyname string) { } func keymatch(keyname string, actor string) string { - hash := strings.IndexByte(keyname, '#') - if hash == -1 { - hash = len(keyname) - } - owner := keyname[0:hash] - if owner == actor { - return originate(actor) + origin := originate(actor) + if origin == originate(keyname) { + return origin } return "" }