u
Anirudh Oppiliappan x@icyphox.sh
Sun, 21 Jan 2024 12:27:11 +0200
2 files changed,
3 insertions(+),
4 deletions(-)
M
masto.go
→
masto.go
@@ -44,7 +44,7 @@ return
} j := junk.New() - j["id"] = fmt.Sprintf("%d", snowflake()) + j["id"] = "19" j["website"] = website j["name"] = clientName j["redirect_uri"] = redirectURI@@ -80,9 +80,8 @@ }
uri := fmt.Sprintf("%s?code=%s", redirectURI, nrw.auth) - log.Println("redirecting to", redirectURI+"?code="+nrw.auth) + log.Println("redirecting to", uri) rw.Header().Set("Content-Type", "") - // http.Redirect(rw, r, redirectURI+"?code="+nrw.auth, 302) rw.Header().Set("Location", uri) rw.WriteHeader(302) }
M
masto_util.go
→
masto_util.go
@@ -46,7 +46,7 @@ rw.Write(j.ToBytes())
} func tokengen() string { - b := make([]byte, 32) + b := make([]byte, 64) rand.Read(b) return fmt.Sprintf("%x", b) }