From a7d3873891666fd9507b5794426e9ab7d246acb3 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Mon, 2 May 2016 17:52:34 -0700 Subject: [PATCH] removed import that was mistakenly auto-added --- server/user.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/user.go b/server/user.go index c984b338..edf45ff2 100644 --- a/server/user.go +++ b/server/user.go @@ -1,11 +1,12 @@ package server import ( + "encoding/base32" "net/http" "github.com/gin-gonic/gin" + "github.com/gorilla/securecookie" - "github.com/drone/drone-exp/shared/crypto" "github.com/drone/drone/cache" "github.com/drone/drone/router/middleware/session" "github.com/drone/drone/shared/token" @@ -69,7 +70,9 @@ func PostToken(c *gin.Context) { func DeleteToken(c *gin.Context) { user := session.User(c) - user.Hash = crypto.Rand() + user.Hash = base32.StdEncoding.EncodeToString( + securecookie.GenerateRandomKey(32), + ) if err := store.UpdateUser(c, user); err != nil { c.String(500, "Error revoking tokens. %s", err) return