diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-01-13 10:21:15 -1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-13 21:21:15 +0100 |
commit | 25cfb39d1a1e0c10e156934be6ce513923dd21b5 (patch) | |
tree | cb06da7dc2727c9251f9e7cfdbd958c537c5152e /src/main/java/at/hannibal2/skyhanni | |
parent | ff5863c2964cfe06c310725dd6b6fe0cd349e469 (diff) | |
download | skyhanni-25cfb39d1a1e0c10e156934be6ce513923dd21b5.tar.gz skyhanni-25cfb39d1a1e0c10e156934be6ce513923dd21b5.tar.bz2 skyhanni-25cfb39d1a1e0c10e156934be6ce513923dd21b5.zip |
don't allow uppercase keys plus more descriptive error (#913)
Don't allow uppercase Repo Pattern keys and added a more descriptive error. #913
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt b/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt index 5140aa186..1aee38844 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt @@ -104,13 +104,13 @@ object RepoPatternManager { } } - val keyShape = Pattern.compile("^(?:[a-z0-9A-Z]+\\.)*[a-z0-9A-Z]+$") + val keyShape = Pattern.compile("^(?:[a-z0-9]+\\.)*[a-z0-9]+$") /** * Verify that a key has a valid shape or throw otherwise. */ fun verifyKeyShape(key: String) { - require(keyShape.matches(key)) + require(keyShape.matches(key)) { "pattern key: \"$key\" failed shape requirements" } } /** |