Update flutter/lib/common/widgets/dialog.dart

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
RustDesk
2026-07-15 10:26:41 +08:00
committed by GitHub
parent f6212e6465
commit 6666bcea96

View File

@@ -357,11 +357,14 @@ void changeIdWhiteList({Function()? callback}) async {
if (newIdWhiteListField.isEmpty) {
// pass
} else {
final ids =
newIdWhiteListField.trim().split(RegExp(r"[\s,;\n]+"));
final ids = newIdWhiteListField
.trim()
.split(RegExp(r"[\s,;\n]+"))
.where((e) => e.isNotEmpty)
.toList();
// test id, wildcards '*' and '?' are allowed;
// '@' '.' ':' occur in cross-server IDs like "123456789@server:port"
final idMatch = RegExp(r"^[a-zA-Z0-9\_\-\*\?\@\.\:]+$");
final idMatch = RegExp(r"^[a-zA-Z0-9_*?@.:-]+$");
for (final id in ids) {
if (!idMatch.hasMatch(id)) {
msg = "${translate("Invalid ID")} $id";