all repos — honk @ e388e597c55b4504a709ebf83cd8440edb850d1c

my fork of honk

u
Anirudh Oppiliappan x@icyphox.sh
Wed, 15 Mar 2023 00:17:56 +0530
commit

e388e597c55b4504a709ebf83cd8440edb850d1c

parent

3762e5454acd3062b5c5d67e658143ac5f8be51e

1 files changed, 4 insertions(+), 2 deletions(-)

jump to
M masto.gomasto.go

@@ -15,6 +15,8 @@ }

// https://docs.joinmastodon.org/methods/apps/#create func apiapps(rw http.ResponseWriter, r *http.Request) { + + dlog.Println(r.URL.RawQuery) if err := r.ParseForm(); err != nil { http.Error(rw, "invalid input", http.StatusUnprocessableEntity) return

@@ -42,11 +44,11 @@ j["client_secret"] = clientSecret

j["vapid_key"] = vapidKey rw.WriteHeader(http.StatusOK) - j.Write(rw) + rw.Write(j.ToBytes()) } func tokengen() string { - b := make([]byte, 64) + b := make([]byte, 32) rand.Read(b) return fmt.Sprintf("%x", b) }