commit 140b0e4fc47a12c5b7705f364ff1cb9722b62186
parent 0b476faff79425073a12d0eef0c5dabb58c37e9d
Author: William Casarin <jb55@jb55.com>
Date: Mon, 6 Feb 2023 10:47:06 -0800
Fix bech32 decoding bug
Changelog-Fixed: Fix some lnurls not getting decoded properly
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/damus/Util/Bech32.swift b/damus/Util/Bech32.swift
@@ -147,7 +147,7 @@ public func bech32_decode(_ str: String) throws -> (hrp: String, data: Data)? {
guard let strBytes = str.data(using: .utf8) else {
throw Bech32Error.nonUTF8String
}
- guard strBytes.count <= 90 else {
+ guard strBytes.count <= 2024 else {
throw Bech32Error.stringLengthExceeded
}
var lower: Bool = false