Allow underscores in IP address wildcards of users, in conjunction with --skip-name-resolve on the server. Closes #1080

This commit is contained in:
Ansgar Becker
2020-07-03 12:12:03 +02:00
parent bca89ec2f3
commit f13ddfc5dd

View File

@@ -1501,7 +1501,8 @@ var
rx: TRegExpr;
begin
rx := TRegExpr.Create;
rx.Expression := '^(localhost|[\d\.\/\:]+|.*%.*|[\w\d]{4}\:.*)$';
// Valid ips or wildcards which do not need name resolving:
rx.Expression := '^(localhost|[\d\.\/\:_]+|.*%.*|[\w\d_]{4}\:.*)$';
Result := not rx.Exec(Host);
rx.Free;
end;