mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-07-16 12:55:45 +03:00
Update flutter/lib/common/widgets/dialog.dart
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -357,11 +357,14 @@ void changeIdWhiteList({Function()? callback}) async {
|
|||||||
if (newIdWhiteListField.isEmpty) {
|
if (newIdWhiteListField.isEmpty) {
|
||||||
// pass
|
// pass
|
||||||
} else {
|
} else {
|
||||||
final ids =
|
final ids = newIdWhiteListField
|
||||||
newIdWhiteListField.trim().split(RegExp(r"[\s,;\n]+"));
|
.trim()
|
||||||
|
.split(RegExp(r"[\s,;\n]+"))
|
||||||
|
.where((e) => e.isNotEmpty)
|
||||||
|
.toList();
|
||||||
// test id, wildcards '*' and '?' are allowed;
|
// test id, wildcards '*' and '?' are allowed;
|
||||||
// '@' '.' ':' occur in cross-server IDs like "123456789@server:port"
|
// '@' '.' ':' 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) {
|
for (final id in ids) {
|
||||||
if (!idMatch.hasMatch(id)) {
|
if (!idMatch.hasMatch(id)) {
|
||||||
msg = "${translate("Invalid ID")} $id";
|
msg = "${translate("Invalid ID")} $id";
|
||||||
|
|||||||
Reference in New Issue
Block a user