Better recovery

This commit is contained in:
Howl
2016-06-16 13:49:35 +02:00
parent cbcfacb06a
commit 9658957067
3 changed files with 103 additions and 2 deletions
+3
View File
@@ -1,7 +1,9 @@
package app
import (
"crypto/md5"
"encoding/json"
"fmt"
"io/ioutil"
"regexp"
@@ -34,6 +36,7 @@ func initialCaretaker(c *gin.Context, f func(md common.MethodData) common.CodeMe
default:
token, _ = c.Cookie("X-Ripple-Token")
}
c.Set("token", fmt.Sprintf("%x", md5.Sum([]byte(token))))
md := common.MethodData{
DB: db,