Skip to content

Panic (crash) when requesting password without configured cache #19701

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
siretart opened this issue May 14, 2022 · 4 comments
Closed

Panic (crash) when requesting password without configured cache #19701

siretart opened this issue May 14, 2022 · 4 comments
Labels

Comments

@siretart
Copy link

Using gitea v1.16.11

Running using https://gitea.com/gitea/helm-chart/ on Raspberry Pi's, for which there is no memcached image Therefore, I've disabled the cache. This apparently leads to a crash in:

if ctx.Cache.IsExist("MailResendLimit_" + u.LowerName) {

Full backtrace:

2022/05/14 00:03:31 routers/web/base.go:130:1() [E] PANIC: runtime error: invalid memory address or nil pointer dereference
	/usr/local/go/src/runtime/panic.go:220 (0x457635)
	/usr/local/go/src/runtime/signal_unix.go:818 (0x457605)
	/go/src/code.gitea.io/gitea/routers/web/auth/password.go:83 (0x1fae963)
	/go/src/code.gitea.io/gitea/modules/web/route.go:74 (0x1e47d44)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:442 (0x1656dd5)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/src/code.gitea.io/gitea/modules/web/route.go:113 (0x1e48531)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/src/code.gitea.io/gitea/modules/web/route.go:113 (0x1e48531)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/src/code.gitea.io/gitea/modules/web/route.go:113 (0x1e48531)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/pkg/mod/github.com/go-chi/chi/[email protected]/middleware/get_head.go:37 (0x1e77de4)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/src/code.gitea.io/gitea/modules/web/route.go:113 (0x1e48531)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/src/code.gitea.io/gitea/modules/context/context.go:745 (0x1668786)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:71 (0x1654c0c)
	/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:314 (0x16565bb)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:442 (0x1656dd5)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/src/code.gitea.io/gitea/routers/web/base.go:169 (0x20332d1)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/pkg/mod/gitea.com/go-chi/[email protected]/session.go:257 (0x146137d)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/src/code.gitea.io/gitea/modules/public/public.go:42 (0x15949db)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:71 (0x1654c0c)
	/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:314 (0x16565bb)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:442 (0x1656dd5)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/src/code.gitea.io/gitea/routers/common/middleware.go:78 (0x1e7dfc1)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/src/code.gitea.io/gitea/modules/context/access_log.go:38 (0x165c10a)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/src/code.gitea.io/gitea/routers/common/logger.go:23 (0x1e7d24f)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/pkg/mod/github.com/go-chi/chi/[email protected]/middleware/strip.go:30 (0x1e7ab58)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/pkg/mod/github.com/chi-middleware/[email protected]/middleware.go:37 (0x1e77456)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/src/code.gitea.io/gitea/routers/common/middleware.go:31 (0x1e7de19)
	/usr/local/go/src/net/http/server.go:2084 (0x7ac6ce)
	/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:88 (0x1654bc1)
	/go/src/code.gitea.io/gitea/modules/web/route.go:328 (0x1e4b38d)
	/usr/local/go/src/net/http/server.go:2916 (0x7afcba)
	/usr/local/go/src/net/http/server.go:1966 (0x7ab176)
	/usr/local/go/src/runtime/asm_amd64.s:1571 (0x4745a0)
@lunny lunny added the type/bug label May 14, 2022
@lunny
Copy link
Member

lunny commented May 14, 2022

Gitea v1.16.11 is not released yet, are you sure you are not kidding?

@Gusted
Copy link
Contributor

Gusted commented May 14, 2022

I think they meant 1.15.11?

@wxiaoguang
Copy link
Contributor

@lunny
Copy link
Member

lunny commented May 14, 2022

Maybe

@lunny lunny closed this as completed May 14, 2022
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants