提问之前请先在 1Panel 问题排查思路 找一下有没有解决方案
提需求请在 GitHub · Where software is built 这里提 100% 回复
反馈问题【BUG】请附带以下信息
1Panel 版本:2.0.14
操作系统(设备): Debian 6.1.153
关键截图:
日志:
============================================================
获取 1Panel 用户信息
panic: runtime error: slice bounds out of range [:-221] [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x2c pc=0xca105c]
goroutine 1 [running]:
github.com/sirupsen/logrus.(*Logger).level(...)
github.com/sirupsen/logrus@v1.9.3/logger.go:358
github.com/sirupsen/logrus.(*Logger).IsLevelEnabled(...)
github.com/sirupsen/logrus@v1.9.3/logger.go:380
github.com/sirupsen/logrus.(*Logger).Logf(0x9e8c01?, 0x9efc80?, {0x1b21838?, 0xa7cd4f?}, {0xc00046f880?, 0xc00046f870?, 0x440598?})
github.com/sirupsen/logrus@v1.9.3/logger.go:152 +0x1c
github.com/sirupsen/logrus.(*Logger).Errorf(0x4405e0?, {0x1b21838?, 0xc00046f8c8?}, {0xc00046f880?, 0xc00046f890?, 0x440365?})
github.com/sirupsen/logrus@v1.9.3/logger.go:186 +0x31
github.com/1Panel-dev/1Panel/core/utils/encrypt.StringDecryptWithKey.func1()
github.com/1Panel-dev/1Panel/core/utils/encrypt/encrypt.go:75 +0x4c
panic({0x1a07180?, 0xc00083bbd8?})
runtime/panic.go:792 +0x132
github.com/1Panel-dev/1Panel/core/utils/encrypt.unPadding(...)
github.com/1Panel-dev/1Panel/core/utils/encrypt/encrypt.go:103
github.com/1Panel-dev/1Panel/core/utils/encrypt.aesDecryptWithSalt({0xc00046fa28?, 0xc0005ea840?, 0x2c?}, {0xc000920e10, 0x20, 0x21})
github.com/1Panel-dev/1Panel/core/utils/encrypt/encrypt.go:134 +0x13e
github.com/1Panel-dev/1Panel/core/utils/encrypt.StringDecryptWithKey({0xc000920de0?, 0xc00063c460?}, {0xc0005ea840, 0x10})
github.com/1Panel-dev/1Panel/core/utils/encrypt/encrypt.go:86 +0xdc
github.com/1Panel-dev/1Panel/core/utils/encrypt.StringDecrypt({0xc000920de0?, 0x1ac5ef8?})
github.com/1Panel-dev/1Panel/core/utils/encrypt/encrypt.go:69 +0x109
github.com/1Panel-dev/1Panel/core/cmd/server/cmd.init.func18(0xc0000cec00?, {0x1aba10c?, 0x4?, 0x1ab9bc0?})
github.com/1Panel-dev/1Panel/core/cmd/server/cmd/user-info.go:40 +0x1fb
github.com/spf13/cobra.(*Command).execute(0x4fd0120, {0xc00066c1a0, 0x2, 0x2})
github.com/spf13/cobra@v1.8.1/command.go:985 +0xad4
github.com/spf13/cobra.(*Command).ExecuteC(0x4fcefe0)
github.com/spf13/cobra@v1.8.1/command.go:1117 +0x44f
github.com/spf13/cobra.(*Command).Execute(0x0?)
github.com/spf13/cobra@v1.8.1/command.go:1041 +0x13
main.main()
./main.go:41 +0x1a