aboutsummaryrefslogtreecommitdiff
path: root/openpgp-ktx/src
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2021-05-02 11:06:30 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2021-05-02 11:14:08 +0530
commit2fab258bc0308b788cfeaa9799537d3ffd6d149b (patch)
tree9f100a1142c05b755fe6c6e3f9802767be85751a /openpgp-ktx/src
parentec7daf895ed743c22d0d8a0f50df34fb778b164e (diff)
openpgp-ktx: accept emails without a TLD
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'openpgp-ktx/src')
-rw-r--r--openpgp-ktx/src/main/java/me/msfjarvis/openpgpktx/util/OpenPgpUtils.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/openpgp-ktx/src/main/java/me/msfjarvis/openpgpktx/util/OpenPgpUtils.kt b/openpgp-ktx/src/main/java/me/msfjarvis/openpgpktx/util/OpenPgpUtils.kt
index feadb266..ca7e3d3d 100644
--- a/openpgp-ktx/src/main/java/me/msfjarvis/openpgpktx/util/OpenPgpUtils.kt
+++ b/openpgp-ktx/src/main/java/me/msfjarvis/openpgpktx/util/OpenPgpUtils.kt
@@ -20,7 +20,7 @@ public object OpenPgpUtils {
Pattern.DOTALL
)
private val USER_ID_PATTERN = Pattern.compile("^(.*?)(?: \\((.*)\\))?(?: <(.*)>)?$")
- private val EMAIL_PATTERN = Pattern.compile("^<?\"?([^<>\"]*@[^<>\"]*\\.[^<>\"]*)\"?>?$")
+ private val EMAIL_PATTERN = Pattern.compile("^<?\"?([^<>\"]*@[^<>\"]*[.]?[^<>\"]*)\"?>?$")
public const val PARSE_RESULT_NO_PGP: Int = -1
public const val PARSE_RESULT_MESSAGE: Int = 0
public const val PARSE_RESULT_SIGNED_MESSAGE: Int = 1