downstream: be less strict when picking up client name
Allow e.g. the SASL username to contain "username/network" and the raw username to contain "username@client", for instance.
This commit is contained in:
parent
df4af1856a
commit
348e6da1fc
@ -1287,8 +1287,12 @@ func (dc *downstreamConn) register(ctx context.Context) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if dc.clientName == "" && dc.networkName == "" {
|
_, fallbackClientName, fallbackNetworkName := unmarshalUsername(dc.rawUsername)
|
||||||
_, dc.clientName, dc.networkName = unmarshalUsername(dc.rawUsername)
|
if dc.clientName == "" {
|
||||||
|
dc.clientName = fallbackClientName
|
||||||
|
}
|
||||||
|
if dc.networkName == "" {
|
||||||
|
dc.networkName = fallbackNetworkName
|
||||||
}
|
}
|
||||||
|
|
||||||
dc.registered = true
|
dc.registered = true
|
||||||
|
Loading…
Reference in New Issue
Block a user