all repos — honk @ 70a3a848025ed86b6bd25dd5fa5f0675952eecc3

my fork of honk

fix a dumb bug caused by err shadow which prevented pubkey loading from working
Ted Unangst tedu@tedunangst.com
Mon, 18 Nov 2019 15:18:07 -0500
commit

70a3a848025ed86b6bd25dd5fa5f0675952eecc3

parent

89e9d2cb5ffbb5200aa25e00b398b8228bd86213

3 files changed, 10 insertions(+), 7 deletions(-)

jump to
M activity.goactivity.go

@@ -1433,7 +1433,6 @@ _, err = stmtSaveXonker.Exec(keyname, data, "pubkey")

if err != nil { log.Printf("error saving key: %s", err) } - return } func ingestboxes(origin string, obj junk.Junk) {
M docs/changelog.txtdocs/changelog.txt

@@ -2,6 +2,8 @@ changelog

-- next ++ Fix bug preventing import of keys + -- 0.8.2 ++ Import command to preserve those embarssassing old posts from Twitter.
M fun.gofun.go

@@ -594,15 +594,17 @@ }

allinjest(originate(keyname), j) row = stmtGetXonker.QueryRow(keyname, "pubkey") err = row.Scan(&data) - } - if err == nil { - _, key, err := httpsig.DecodeKey(data) if err != nil { - log.Printf("error decoding %s pubkey: %s", keyname, err) + log.Printf("key not found after ingesting") + return nil, true } - return key, true } - return nil, true + _, key, err := httpsig.DecodeKey(data) + if err != nil { + log.Printf("error decoding %s pubkey: %s", keyname, err) + return nil, true + } + return key, true }, Limit: 512}) func zaggy(keyname string) *rsa.PublicKey {