unable to change user password #1587

Closed
opened 2023-08-04 01:17:13 +00:00 by ca1f · 2 comments

Description

Trying to change my password on a self-hosted vikunja instance leads to the following stack trace being dumped into the logs:

reflect: call of reflect.Value.Len on interface Value goroutine 256 [running]:
github.com/labstack/echo/v4/middleware.RecoverWithConfig.func1.1.1()
	/go/pkg/mod/github.com/labstack/echo/v4@v4.10.2/middleware/recover.go:93 +0x120
panic({0x131f860, 0x4000f74ac8})
	/usr/local/go/src/runtime/panic.go:884 +0x1f4
reflect.Value.lenNonSlice({0x130ebe0?, 0x40251f3700?, 0x40251f9980?})
	/usr/local/go/src/reflect/value.go:1714 +0x160
reflect.Value.Len(...)
	/usr/local/go/src/reflect/value.go:1693
xorm.io/xorm/internal/statements.(*Statement).BuildUpdates(0x400041d680, {0x149b1e0, 0x40251f3600, 0x199}, 0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/go/pkg/mod/xorm.io/xorm@v1.3.2/internal/statements/update.go:264 +0xb90
xorm.io/xorm.(*Session).Update(0x4000438820, {0x140ee20, 0x40251f3600}, {0x0, 0x0, 0x40251f9740?})
	/go/pkg/mod/xorm.io/xorm@v1.3.2/session_update.go:191 +0x43c
code.vikunja.io/api/pkg/user.UpdateUserPassword(0x4000438820, 0x40251f3340, {0x4000192b70, 0x2e})
	/go/src/code.vikunja.io/api/pkg/user/user.go:552 +0xf4
code.vikunja.io/api/pkg/routes/api/v1.UserChangePassword({0x18defe0, 0x40002a23c0})
	/go/src/code.vikunja.io/api/pkg/routes/api/v1/user_update_password.go:76 +0x11c
github.com/labstack/echo-jwt/v4.Config.ToMiddleware.func2.1({0x18defe0, 0x40002a23c0})
	/go/pkg/mod/github.com/labstack/echo-jwt/v4@v4.2.0/jwt.go:237 +0x388
code.vikunja.io/api/pkg/routes.registerAPIRoutes.func1.1({0x18defe0, 0x40002a23c0})
	/go/src/code.vikunja.io/api/pkg/routes/routes.go:230 +0x1a4
github.com/labstack/echo/v4.(*Echo).add.func1({0x18defe0, 0x40002a23c0})
	/go/pkg/mod/github.com/labstack/echo/v4@v4.10.2/echo.go:575 +0x50
github.com/labstack/echo/v4/middleware.CORSWithConfig.func1.1({0x18defe0, 0x40002a23c0})
	/go/pkg/mod/github.com/labstack/echo/v4@v4.10.2/middleware/cors.go:264 +0x710
github.com/labstack/echo/v4/middleware.RecoverWithConfig.func1.1({0x18defe0, 0x40002a23c0})
	/go/pkg/mod/github.com/labstack/echo/v4@v4.10.2/middleware/recover.go:119 +0xd8
github.com/labstack/echo/v4/middleware.LoggerWithConfig.func2.1({0x18defe0, 0x40002a23c0})
	/go/pkg/mod/github.com/labstack/echo/v4@v4.10.2/middleware/logger.go:126 +0xa0
github.com/labstack/echo/v4.(*Echo).ServeHTTP(0x40003f0000, {0x18c1220?, 0x40000c6a80}, 0x4000479200)
	/go/pkg/mod/github.com/labstack/echo/v4@v4.10.2/echo.go:662 +0x400
net/http.serverHandler.ServeHTTP({0x18bd810?}, {0x18c1220, 0x40000c6a80}, 0x4000479200)
	/usr/local/go/src/net/http/server.go:2936 +0x2c0
net/http.(*conn).serve(0x4000018510, {0x18c1be8, 0x40005cc2d0})
	/usr/local/go/src/net/http/server.go:1995 +0x518
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:3089 +0x4e8

Vikunja Frontend Version

0.21.0

Vikunja API Version

0.21.0

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

Yes

Screenshots

No response

### Description Trying to change my password on a self-hosted vikunja instance leads to the following stack trace being dumped into the logs: ``` reflect: call of reflect.Value.Len on interface Value goroutine 256 [running]: github.com/labstack/echo/v4/middleware.RecoverWithConfig.func1.1.1() /go/pkg/mod/github.com/labstack/echo/v4@v4.10.2/middleware/recover.go:93 +0x120 panic({0x131f860, 0x4000f74ac8}) /usr/local/go/src/runtime/panic.go:884 +0x1f4 reflect.Value.lenNonSlice({0x130ebe0?, 0x40251f3700?, 0x40251f9980?}) /usr/local/go/src/reflect/value.go:1714 +0x160 reflect.Value.Len(...) /usr/local/go/src/reflect/value.go:1693 xorm.io/xorm/internal/statements.(*Statement).BuildUpdates(0x400041d680, {0x149b1e0, 0x40251f3600, 0x199}, 0x0?, 0x0?, 0x0?, 0x0?, 0x0?) /go/pkg/mod/xorm.io/xorm@v1.3.2/internal/statements/update.go:264 +0xb90 xorm.io/xorm.(*Session).Update(0x4000438820, {0x140ee20, 0x40251f3600}, {0x0, 0x0, 0x40251f9740?}) /go/pkg/mod/xorm.io/xorm@v1.3.2/session_update.go:191 +0x43c code.vikunja.io/api/pkg/user.UpdateUserPassword(0x4000438820, 0x40251f3340, {0x4000192b70, 0x2e}) /go/src/code.vikunja.io/api/pkg/user/user.go:552 +0xf4 code.vikunja.io/api/pkg/routes/api/v1.UserChangePassword({0x18defe0, 0x40002a23c0}) /go/src/code.vikunja.io/api/pkg/routes/api/v1/user_update_password.go:76 +0x11c github.com/labstack/echo-jwt/v4.Config.ToMiddleware.func2.1({0x18defe0, 0x40002a23c0}) /go/pkg/mod/github.com/labstack/echo-jwt/v4@v4.2.0/jwt.go:237 +0x388 code.vikunja.io/api/pkg/routes.registerAPIRoutes.func1.1({0x18defe0, 0x40002a23c0}) /go/src/code.vikunja.io/api/pkg/routes/routes.go:230 +0x1a4 github.com/labstack/echo/v4.(*Echo).add.func1({0x18defe0, 0x40002a23c0}) /go/pkg/mod/github.com/labstack/echo/v4@v4.10.2/echo.go:575 +0x50 github.com/labstack/echo/v4/middleware.CORSWithConfig.func1.1({0x18defe0, 0x40002a23c0}) /go/pkg/mod/github.com/labstack/echo/v4@v4.10.2/middleware/cors.go:264 +0x710 github.com/labstack/echo/v4/middleware.RecoverWithConfig.func1.1({0x18defe0, 0x40002a23c0}) /go/pkg/mod/github.com/labstack/echo/v4@v4.10.2/middleware/recover.go:119 +0xd8 github.com/labstack/echo/v4/middleware.LoggerWithConfig.func2.1({0x18defe0, 0x40002a23c0}) /go/pkg/mod/github.com/labstack/echo/v4@v4.10.2/middleware/logger.go:126 +0xa0 github.com/labstack/echo/v4.(*Echo).ServeHTTP(0x40003f0000, {0x18c1220?, 0x40000c6a80}, 0x4000479200) /go/pkg/mod/github.com/labstack/echo/v4@v4.10.2/echo.go:662 +0x400 net/http.serverHandler.ServeHTTP({0x18bd810?}, {0x18c1220, 0x40000c6a80}, 0x4000479200) /usr/local/go/src/net/http/server.go:2936 +0x2c0 net/http.(*conn).serve(0x4000018510, {0x18c1be8, 0x40005cc2d0}) /usr/local/go/src/net/http/server.go:1995 +0x518 created by net/http.(*Server).Serve /usr/local/go/src/net/http/server.go:3089 +0x4e8 ``` ### Vikunja Frontend Version 0.21.0 ### Vikunja API Version 0.21.0 ### Browser and version _No response_ ### Can you reproduce the bug on the Vikunja demo site? Yes ### Screenshots _No response_
ca1f added the
kind/bug
label 2023-08-04 01:17:13 +00:00
Owner
Related: https://github.com/go-vikunja/api/issues/79
Owner

Resolved in 40037f25f2. Please check with the next unstable build if the problem went away.

Resolved in https://kolaente.dev/vikunja/api/commit/40037f25f22935db2c103fb767cdaa70dc980979. Please check with the next unstable build if the problem went away.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#1587
No description provided.