mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-20 05:52:24 +00:00
fix empty client ID on request
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
This commit is contained in:
parent
2cf762642b
commit
e794d3d87f
1 changed files with 2 additions and 2 deletions
|
@ -609,7 +609,7 @@ func (s *InboundService) UpdateInboundClient(data *model.Inbound, clientId strin
|
|||
|
||||
oldEmail := ""
|
||||
newClientId := ""
|
||||
clientIndex := 0
|
||||
clientIndex := -1
|
||||
for index, oldClient := range oldClients {
|
||||
oldClientId := ""
|
||||
if oldInbound.Protocol == "trojan" {
|
||||
|
@ -630,7 +630,7 @@ func (s *InboundService) UpdateInboundClient(data *model.Inbound, clientId strin
|
|||
}
|
||||
|
||||
// Validate new client ID
|
||||
if newClientId == "" {
|
||||
if newClientId == "" || clientIndex == -1 {
|
||||
return false, common.NewError("empty client ID")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue