u
Anirudh Oppiliappan x@icyphox.sh
Wed, 15 Mar 2023 00:17:56 +0530
1 files changed,
4 insertions(+),
2 deletions(-)
jump to
M
masto.go
→
masto.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) }