Fix: Validate SMTP XCLIENT args before processing

This commit is contained in:
Ralph Slooten
2026-05-09 17:13:22 +12:00
parent 4502cdc358
commit da8eb3ece8

View File

@@ -639,6 +639,9 @@ loop:
xCArgs := strings.SplitSeq(args, " ")
for xCArg := range xCArgs {
xCParse := strings.Split(strings.TrimSpace(xCArg), "=")
if len(xCParse) != 2 {
continue
}
if strings.ToUpper(xCParse[0]) == "ADDR" && (net.ParseIP(xCParse[1]) != nil) {
s.xClientADDR = xCParse[1]
}