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

View File

@@ -138,7 +138,7 @@ namespace SwayNotificationCenter {
construct { construct {
try { 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); RegexCompileFlags.MULTILINE);
string joined_tags = string.joinv ("|", TAGS); string joined_tags = string.joinv ("|", TAGS);
tag_regex = new Regex ("&lt;(/?(?:%s))&gt;".printf (joined_tags)); tag_regex = new Regex ("&lt;(/?(?:%s))&gt;".printf (joined_tags));