fix: reject Hysteria inbound updates with empty client auth (#6268)

Fixes #6232

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
This commit is contained in:
Matt Van Horn
2026-08-22 22:11:42 +01:00
committed by GitHub
parent bd6a6aba43
commit 585f4ecdc0
2 changed files with 118 additions and 0 deletions
+12
View File
@@ -1410,6 +1410,18 @@ func (s *InboundService) UpdateInbound(inbound *model.Inbound) (*model.Inbound,
s.normalizeMtprotoSecret(inbound)
inbound.SubSortIndex = normalizeSubSortIndex(inbound.SubSortIndex)
clients, err := s.GetClients(inbound)
if err != nil {
return inbound, false, err
}
if inbound.Protocol == model.Hysteria {
for _, client := range clients {
if client.Auth == "" {
return inbound, false, common.NewError("empty client ID")
}
}
}
oldInbound, err := s.GetInbound(inbound.Id)
if err != nil {
return inbound, false, err