Skip to content

Not possible to request for second activation email #6480

Closed
@lafriks

Description

@lafriks

PR #6106 broke functionality to request for activation link again.

After authorization user gets:
image

When clicking on resend activation email, user gets error 500 and error in gitea.log:

2019/04/01 16:33:30 [...les/context/panic.go:36 1()] [E] PANIC:: runtime error: invalid memory address or nil pointer dereference
/usr/local/go/src/runtime/panic.go:513 (0x42f226)
	gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
/usr/local/go/src/runtime/panic.go:82 (0x42e324)
	panicmem: panic(memoryError)
/usr/local/go/src/runtime/signal_windows.go:204 (0x443a50)
	sigpanic: panicmem()
/home/test/go/src/code.gitea.io/gitea/routers/user/auth.go:1041 (0x111c8d5)
	Activate: if ctx.User.IsActive {
/usr/local/go/src/runtime/asm_amd64.s:522 (0x45bd61)
	call32: CALLFN(·call32, 32)
/usr/local/go/src/reflect/value.go:447 (0x4dbf4f)
	Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset))
/usr/local/go/src/reflect/value.go:308 (0x4db9ca)
	Value.Call: return v.call("Call", in)
/home/test/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 (0x967fda)
	(*injector).callInvoke: return reflect.ValueOf(f).Call(in), nil
/home/test/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 (0x967920)
	(*injector).Invoke: return inj.callInvoke(f, t, t.NumIn())
/home/test/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:121 (0x996267)
	(*Context).run: vals, err := c.Invoke(c.handler())
/home/test/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:112 (0x996165)
	(*Context).Next: c.run()
/home/test/go/src/code.gitea.io/gitea/modules/context/panic.go:40 (0x1068c4a)
	Recovery.func1: ctx.Next()
/usr/local/go/src/runtime/asm_amd64.s:522 (0x45bd61)
	call32: CALLFN(·call32, 32)
/usr/local/go/src/reflect/value.go:447 (0x4dbf4f)
	Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset))
/usr/local/go/src/reflect/value.go:308 (0x4db9ca)
	Value.Call: return v.call("Call", in)
/home/test/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 (0x967fda)
	(*injector).callInvoke: return reflect.ValueOf(f).Call(in), nil
/home/test/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 (0x967920)
	(*injector).Invoke: return inj.callInvoke(f, t, t.NumIn())
/home/test/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:121 (0x996267)
	(*Context).run: vals, err := c.Invoke(c.handler())
/home/test/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:112 (0x996165)
	(*Context).Next: c.run()
/home/test/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/session/session.go:192 (0x9b54b5)
	Sessioner.func1: ctx.Next()
/home/test/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:79 (0x9960d7)
	ContextInvoker.Invoke: invoke(params[0].(*Context))
/home/test/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:157 (0x967cb7)
	(*injector).fastInvoke: return f.Invoke(in)
/home/test/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:135 (0x967a12)
	(*injector).Invoke: return inj.fastInvoke(v, t, t.NumIn())
/home/test/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:121 (0x996267)
	(*Context).run: vals, err := c.Invoke(c.handler())
/home/test/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:112 (0x996165)
	(*Context).Next: c.run()
/home/test/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/recovery.go:161 (0x9a73b1)
	Recovery.func1: c.Next()
/home/test/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/logger.go:40 (0x9994da)
	LoggerInvoker.Invoke: invoke(params[0].(*Context), params[1].(*log.Logger))
/home/test/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:157 (0x967cb7)
	(*injector).fastInvoke: return f.Invoke(in)
/home/test/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:135 (0x967a12)
	(*injector).Invoke: return inj.fastInvoke(v, t, t.NumIn())
/home/test/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:121 (0x996267)
	(*Context).run: vals, err := c.Invoke(c.handler())
/home/test/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:112 (0x996165)
	(*Context).Next: c.run()
/home/test/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/logger.go:52 (0x9a66b7)
	Logger.func1: ctx.Next()
/home/test/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/logger.go:40 (0x9994da)
	LoggerInvoker.Invoke: invoke(params[0].(*Context), params[1].(*log.Logger))
/home/test/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:157 (0x967cb7)
	(*injector).fastInvoke: return f.Invoke(in)
/home/test/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:135 (0x967a12)
	(*injector).Invoke: return inj.fastInvoke(v, t, t.NumIn())
/home/test/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:121 (0x996267)
	(*Context).run: vals, err := c.Invoke(c.handler())
/home/test/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/router.go:187 (0x9a85bb)
	(*Router).Handle.func1: c.run()
/home/test/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/router.go:294 (0x9a1ead)
	(*Router).ServeHTTP: leaf.handle(rw, req, nil)
/home/test/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/macaron.go:220 (0x99a848)
	(*Macaron).ServeHTTP: m.Router.ServeHTTP(rw, req)
/home/test/go/src/code.gitea.io/gitea/vendor/github.com/gorilla/context/context.go:141 (0xca1471)
	ClearHandler.func1: h.ServeHTTP(w, r)
/usr/local/go/src/net/http/server.go:1964 (0x6bdd4a)
	HandlerFunc.ServeHTTP: f(w, r)
/usr/local/go/src/net/http/server.go:2741 (0x6c0b01)
	serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/local/go/src/net/http/server.go:1847 (0x6bcd7c)
	(*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/local/go/src/runtime/asm_amd64.s:1333 (0x45dae0)
	goexit: BYTE	$0x90	// NOP

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions