allow 8 digits in 2fa code regex (#332)

change 2fa regex to allow for 8 digits in a row
This commit is contained in:
Daniel Morgan 2023-11-08 19:56:44 +01:00 committed by GitHub
parent 90688d0fe9
commit 3ed3ab8fec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,7 @@ namespace SwayNotificationCenter {
construct {
try {
code_regex = new Regex ("(?<= |^)(\\d{3}(-| )\\d{3}|\\d{4,7})(?= |$|\\.|,)",
code_regex = new Regex ("(?<= |^)(\\d{3}(-| )\\d{3}|\\d{4,8})(?= |$|\\.|,)",
RegexCompileFlags.MULTILINE);
string joined_tags = string.joinv ("|", TAGS);
tag_regex = new Regex ("&lt;(/?(?:%s))&gt;".printf (joined_tags));