Skip to content
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

fix: del the chan admin password encryption #331

Merged
merged 41 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
01f7d4f
feat: add some api about admin
luhaoling Dec 12, 2023
c65ada3
fix: fix the conflect
luhaoling Dec 13, 2023
260101d
feat: add some api about admin
luhaoling Dec 13, 2023
5ba3e4c
fix: del the unuse method
luhaoling Dec 14, 2023
505a97e
fix: Optimized code
luhaoling Dec 14, 2023
5f5d8bf
fix: fix the userID
luhaoling Dec 14, 2023
0943083
Merge branch 'openimsdk:main' into main
luhaoling Dec 15, 2023
3e5aa69
fix: del the config code getting from zk
luhaoling Dec 15, 2023
37c6d6e
fix: fix the initRedis
luhaoling Dec 15, 2023
bf9ee0e
fix: add the get Evn method in Config
luhaoling Dec 15, 2023
3001392
Merge branch 'openimsdk:main' into main
luhaoling Dec 16, 2023
27550fd
fix: fix the config.yaml.template
luhaoling Dec 18, 2023
925c38f
Merge branch 'openimsdk:main' into env
luhaoling Dec 18, 2023
5a40661
fix: fix the env config
luhaoling Dec 18, 2023
2ec54f0
feat: add some conponent env
luhaoling Dec 18, 2023
b95e97d
Merge branch 'openimsdk:main' into env3
luhaoling Dec 18, 2023
c588e40
fix: add component config env
luhaoling Dec 18, 2023
4b37873
fix: fix the openIMURL
luhaoling Dec 18, 2023
6295454
fix: find the zk don't connect error
luhaoling Dec 18, 2023
6cdaa92
fix: find the zk error
luhaoling Dec 18, 2023
44be73e
fix: test the jz error
luhaoling Dec 18, 2023
33105b6
fix: delt the log
luhaoling Dec 18, 2023
499c888
fix: fix the component error
luhaoling Dec 18, 2023
eb5e025
fix: fix the error of get env location
luhaoling Dec 18, 2023
06ee4a6
fix: fix the error
luhaoling Dec 18, 2023
ce609b8
fix: fix the zk start error
luhaoling Dec 18, 2023
62cf650
fix: fix the Config
luhaoling Dec 18, 2023
7c7df60
fix: testing
luhaoling Dec 18, 2023
7281d02
fix: fix the config.Env error
luhaoling Dec 18, 2023
15f5476
fix: fix the componentCheck
luhaoling Dec 18, 2023
75c4133
fix: fix the config
luhaoling Dec 18, 2023
7f94eab
fix: find the error
luhaoling Dec 18, 2023
21a6ce3
fix: del the flag
luhaoling Dec 18, 2023
210660f
fix: fix the error
luhaoling Dec 18, 2023
60347c4
fix: fix the conflect
luhaoling Dec 18, 2023
c9f90ef
Merge branch 'openimsdk:main' into env2
luhaoling Dec 19, 2023
988fcb8
fix: fix the password error
luhaoling Dec 19, 2023
dac391d
Merge branch 'env2' of github.com:luhaoling/chat into conflect
luhaoling Dec 19, 2023
3828e24
fix: del the proxyHeader field
luhaoling Dec 19, 2023
4f8aecb
fix: fix the openIMurl
luhaoling Dec 19, 2023
9379eb4
fix: fix the conflect
luhaoling Dec 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deployments/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ verifyCode:
smtpPort: 465 # SMTP server port for email sending

# Proxy header configuration for IP extraction
proxyHeader: "X-Forwarded-For" # PROXY_HEADER, Header used for extracting the client IP address
# proxyHeader: "X-Forwarded-For" # PROXY_HEADER, Header used for extracting the client IP address

# List of admin users
adminList:
Expand All @@ -118,7 +118,7 @@ adminList:
imAdmin: openIMAdmin

# URL for OpenIM server
openIMUrl: "172.28.0.1:10002" # OPENIM_SERVER_ADDRESS:API_OPENIM_PORT, URL of the OpenIM server
openIMUrl: "http://127.0.0.1:10002" # OPENIM_SERVER_ADDRESS:API_OPENIM_PORT, URL of the OpenIM server

# Redis configuration - used for caching and session management
redis:
Expand Down
4 changes: 2 additions & 2 deletions internal/rpc/admin/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (o *adminServer) AddAdminAccount(ctx context.Context, req *admin.AddAdminAc

adm := &admin2.Admin{
Account: req.Account,
Password: o.passwordEncryption(req.Password),
Password: req.Password,
FaceURL: req.FaceURL,
Nickname: req.Nickname,
UserID: o.genUserID(),
Expand Down Expand Up @@ -233,7 +233,7 @@ func (o *adminServer) Login(ctx context.Context, req *admin.LoginReq) (*admin.Lo
}
return nil, err
}
if a.Password != o.passwordEncryption(req.Password) {
if a.Password != req.Password {
return nil, eerrs.ErrPassword.Wrap()
}
adminToken, err := o.CreateToken(ctx, &admin.CreateTokenReq{UserID: a.UserID, UserType: constant.AdminUser})
Expand Down
Loading