mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-03-26 17:52:29 +01:00
Protects against empty nip04 content
This commit is contained in:
parent
b5709f9527
commit
8be74649ce
@ -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] == '='
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user