all repos — honk @ 5c453a8d1aa6a6492e152c5b4136af27d4ac25c0

my fork of honk

u
Anirudh Oppiliappan x@icyphox.sh
Sun, 11 Feb 2024 11:16:09 +0200
commit

5c453a8d1aa6a6492e152c5b4136af27d4ac25c0

parent

b8886d2084139057af970d4c09b8e5f71e092e4f

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

jump to
M database.godatabase.go

@@ -1190,7 +1190,7 @@ func getMastoAppFromAccessToken(accesstoken string) *MastoApp {

var clientID string err := stmtGetClientIDWithAccessToken.Get(&clientID, accesstoken) if err == sql.ErrNoRows { - elog.Printf("masto: invalid authtoken: %s\n", accesstoken) + elog.Printf("masto: invalid accesstoken: %s\n", accesstoken) return nil }
M masto.gomasto.go

@@ -148,7 +148,6 @@

if grantType == "authorization_code" { // idk if this is ok? should code be reset? if app.AuthToken == code { - elog.Println("passed aauthtoken==code check") accessToken := tokengen() _, err := stmtSaveMastoAccessToken.Exec(app.ClientID, accessToken) if err != nil {

@@ -161,7 +160,6 @@ j["access_token"] = accessToken

j["token_type"] = "Bearer" j["scope"] = app.Scopes j["created_at"] = time.Now().UTC().Unix() - elog.Println("aboutta goodjunk XXX") goodjunk(rw, j) } } else {
M web.goweb.go

@@ -3015,7 +3015,7 @@ w.WriteHeader(http.StatusBadRequest)

return } - token := split[1] + token := strings.ReplaceAll(split[1], " ", "") app := getMastoAppFromAccessToken(token) if app == nil { elog.Println("masto: invalid access token")