thedanielforum / encrypted_mysql Goto Github PK
View Code? Open in Web Editor NEWEncrypted type for mysql golang
License: MIT License
Encrypted type for mysql golang
License: MIT License
If env ENCRYPTED_MYSQL_SECRET is undefined the library will panic on enc/dec.
ERROR: 'ENCRYPTED_MYSQL_SECRET' needs to be 32 bytes long
ERROR: while running NewCipher on key provided: crypto/aes: invalid key size 0
2018/05/23 22:26:01 [Recovery] 2018/05/23 - 22:26:01 panic recovered:
GET /v1/plugin/algolia/129 HTTP/1.1
Host: localhost:8080
Accept: application/json, text/plain, /
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en;q=0.9,en-US;q=0.8,nb;q=0.7
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Origin: http://localhost:3000
Referer: http://localhost:3000/
runtime error: invalid memory address or nil pointer dereference
/usr/local/Cellar/go/1.9.2/libexec/src/runtime/panic.go:491 (0x102b9a2)
gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
/usr/local/Cellar/go/1.9.2/libexec/src/runtime/panic.go:63 (0x102a8ad)
panicmem: panic(memoryError)
/usr/local/Cellar/go/1.9.2/libexec/src/runtime/signal_unix.go:367 (0x10421db)
sigpanic: panicmem()
/usr/local/Cellar/go/1.9.2/libexec/src/crypto/cipher/cfb.go:57 (0x110f0b9)
newCFB: blockSize := block.BlockSize()
/usr/local/Cellar/go/1.9.2/libexec/src/crypto/cipher/cfb.go:53 (0x110f067)
NewCFBDecrypter: return newCFB(block, iv, true)
/Users/tdf/Documents/Projects/dynamicdelta/dynamicdelta-backend/src/github.com/thedanielforum/encrypted_mysql/crypt.go:77 (0x1138a06)
Decrypt: stream := cipher.NewCFBDecrypter(getCipherBlock(), iv)
/Users/tdf/Documents/Projects/dynamicdelta/dynamicdelta-backend/src/github.com/thedanielforum/encrypted_mysql/driver.go:29 (0x1138e2e)
(*Encrypted).Scan: *e = Encrypted(Decrypt(str))
/usr/local/Cellar/go/1.9.2/libexec/src/database/sql/convert.go:337 (0x10e2f3e)
convertAssign: return scanner.Scan(src)
/usr/local/Cellar/go/1.9.2/libexec/src/database/sql/sql.go:2721 (0x10f2b6e)
(*Rows).Scan: err := convertAssign(dest[i], sv)
/usr/local/Cellar/go/1.9.2/libexec/src/database/sql/sql.go:2814 (0x10f3264)
(*Row).Scan: err := r.rows.Scan(dest...)
/Users/tdf/Documents/Projects/dynamicdelta/dynamicdelta-backend/src/app/models/algolia_plugins.go:69 (0x1590715)
(*AlgoliaPlugin).GetByProjectID: ).Scan(
/Users/tdf/Documents/Projects/dynamicdelta/dynamicdelta-backend/src/app/services/plugin/get_algolia.go:52 (0x18fb323)
(*GetAlgolia).fetch: ga.plugin, err = new(models.AlgoliaPlugin).GetByProjectID(ga.projectID)
/Users/tdf/Documents/Projects/dynamicdelta/dynamicdelta-backend/src/app/services/plugin/get_algolia.go:34 (0x18fb13b)
(*GetAlgolia).Do: if err = ga.fetch(); err != nil {
/Users/tdf/Documents/Projects/dynamicdelta/dynamicdelta-backend/src/app/controllers/plugin.go:74 (0x1918980)
(*Plugin).GetAlgolia: if err = s.Do(); err != nil {
/Users/tdf/Documents/Projects/dynamicdelta/dynamicdelta-backend/src/app/routes/routes.go:90 (0x1925663)
(*Plugin).GetAlgolia-fm: v1.GET("/plugin/algolia/:project_id", plugin.GetAlgolia)
/Users/tdf/Documents/Projects/dynamicdelta/dynamicdelta-backend/src/github.com/gin-gonic/gin/context.go:108 (0x1777112)
(*Context).Next: c.handlersc.index
/Users/tdf/Documents/Projects/dynamicdelta/dynamicdelta-backend/src/app/middlewares/trace.go:14 (0x191f320)
Trace.func1: c.Next()
/Users/tdf/Documents/Projects/dynamicdelta/dynamicdelta-backend/src/github.com/gin-gonic/gin/context.go:108 (0x1777112)
(*Context).Next: c.handlersc.index
/Users/tdf/Documents/Projects/dynamicdelta/dynamicdelta-backend/src/github.com/gin-gonic/gin/recovery.go:47 (0x1789889)
RecoveryWithWriter.func1: c.Next()
/Users/tdf/Documents/Projects/dynamicdelta/dynamicdelta-backend/src/github.com/gin-gonic/gin/context.go:108 (0x1777112)
(*Context).Next: c.handlersc.index
/Users/tdf/Documents/Projects/dynamicdelta/dynamicdelta-backend/src/github.com/gin-gonic/gin/logger.go:83 (0x1788b2b)
LoggerWithWriter.func1: c.Next()
/Users/tdf/Documents/Projects/dynamicdelta/dynamicdelta-backend/src/github.com/gin-gonic/gin/context.go:108 (0x1777112)
(*Context).Next: c.handlersc.index
/Users/tdf/Documents/Projects/dynamicdelta/dynamicdelta-backend/src/github.com/gin-gonic/gin/gin.go:359 (0x17805d5)
(*Engine).handleHTTPRequest: c.Next()
/Users/tdf/Documents/Projects/dynamicdelta/dynamicdelta-backend/src/github.com/gin-gonic/gin/gin.go:326 (0x177fd6a)
(*Engine).ServeHTTP: engine.handleHTTPRequest(c)
/usr/local/Cellar/go/1.9.2/libexec/src/net/http/server.go:2619 (0x12a7913)
serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/local/Cellar/go/1.9.2/libexec/src/net/http/server.go:1801 (0x12a39fc)
(*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/local/Cellar/go/1.9.2/libexec/src/runtime/asm_amd64.s:2337 (0x10596f0)
goexit: BYTE $0x90 // NOP
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.