Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

uppercase for all

rustdesk9f9a22ec63c2
diff --git a/flutter/lib/common/widgets/custom_password.dart b/flutter/lib/common/widgets/custom_password.dart
index 99ece2434..1fa6e3645 100644
--- a/flutter/lib/common/widgets/custom_password.dart
+++ b/flutter/lib/common/widgets/custom_password.dart
@@ -14,7 +14,11 @@ class UppercaseValidationRule extends ValidationRule {
String get name => translate('uppercase');
@override
bool validate(String value) {
- return value.contains(RegExp(r'[A-Z]'));
+ return value.runes.any((int rune) {
+ var character = String.fromCharCode(rune);
+ return character.toUpperCase() == character &&
+ character.toLowerCase() != character;
+ });
}
}