TF-4224 Reduce ReDoS vulnerability
This commit is contained in:
@@ -54,7 +54,7 @@ class AppUtils {
|
||||
static bool isEmailLocalhost(String email) {
|
||||
final normalized = email.trim();
|
||||
return RegExp(
|
||||
r'^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@localhost$'
|
||||
r'^(?:"[^"\r\n]+"|[^<>()[\]\\.,;:\s@"]+(?:\.[^<>()[\]\\.,;:\s@"]+)*)@localhost$'
|
||||
).hasMatch(normalized);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user