mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-27 00:06:37 +02:00
Protects against empty nip04 content
This commit is contained in:
@@ -154,6 +154,7 @@ class Nip04(
|
||||
|
||||
fun isNIP04(encoded: String): Boolean {
|
||||
val l = encoded.length
|
||||
if (l < 28) return false
|
||||
return encoded[l - 28] == '?' && encoded[l - 27] == 'i' && encoded[l - 26] == 'v' && encoded[l - 25] == '='
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user