diff options
Diffstat (limited to 'openpgp-ktx')
-rw-r--r-- | openpgp-ktx/CHANGELOG.md | 1 | ||||
-rw-r--r-- | openpgp-ktx/src/main/java/me/msfjarvis/openpgpktx/util/OpenPgpUtils.kt | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/openpgp-ktx/CHANGELOG.md b/openpgp-ktx/CHANGELOG.md index 6222283c..2b2ff9f7 100644 --- a/openpgp-ktx/CHANGELOG.md +++ b/openpgp-ktx/CHANGELOG.md @@ -3,6 +3,7 @@ ### [Unreleased] - The library now requires Kotlin 1.5.0 configured with `kotlinOptions.languageVersion = "1.5"`. +- Accept emails without a TLD ### [3.0.0] - 2021-04-10 - Relicence under Apache 2.0 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 |